Function at 0x401990
Capabilities:
Accept command line arguments
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x234
mov eax, dword [0x40d004]
xor eax, esp
mov dword [esp + 0x230], eax
push ebx
push esi
push edi
lea eax, [esp + 0x10]
push eax
mov dword [esp + 0x14], 0
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push eax
call dword [sym.imp.SHELL32.dll_CommandLineToArgvW]
mov esi, dword [esp + 0x10]
lea ecx, [esi - 5]
mov edi, eax
mov dword [esp + 0x20], edi
cmp ecx, 0x3f
ja 0x401cde
mov eax, dword [edi + 4]
mov ecx, 0x40b9c4
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x401a0b
test dx, dx
je 0x401a07
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x401a0b
add eax, 4
add ecx, 4
test dx, dx
jne 0x4019e5
xor eax, eax
jmp 0x401a10
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x401cbd
mov eax, dword [edi + esi*4 - 8]
mov ecx, 0x40b9cc
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x401a47
test dx, dx
je 0x401a43
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x401a47
add eax, 4
add ecx, 4
test dx, dx
jne 0x401a21
xor eax, eax
jmp 0x401a4c
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x401cbd
add esi, 0xfffffffc
mov dword [esp + 0x1c], esi
imul esi, esi, 0x20c
push esi
call fcn.00402d87
add esp, 4
push esi
mov ebx, eax
push 0
push ebx
mov dword [esp + 0x30], ebx
call fcn.004064c0
mov edx, dword [esp + 0x28]
add esp, 0xc
push edx
lea ecx, [edi + 8]
push ebx
call fcn.00401630
add esp, 8
test eax, eax
jne 0x401abb
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call fcn.00402d4d
add esp, 4
mov eax, 3
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x230]
xor ecx, esp
call fcn.00402b02
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x10]
mov ecx, dword [edi + eax*4 - 4]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
mov dword [esp + 0x14], edi
cmp edi, 0xffffffff
jne 0x401b15
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
push ebx
call fcn.00402d4d
add esp, 4
mov eax, 4
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x230]
xor ecx, esp
call fcn.00402b02
mov esp, ebp
pop ebp
ret
push 0x104
lea eax, [esp + 0x34]
push eax
push 0
mov dword [esp + 0x24], 5
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
lea ecx, [esp + 0x30]
push ecx
lea esi, [esp + 0x30]
call fcn.00401140
mov ebx, dword [esp + 0x30]
add esp, 4
lea edx, [esp + 0x30]
push edx
push edi
call fcn.004014c0
add esp, 8
test eax, eax
je 0x401c85
mov eax, dword [esp + 0x20]
mov eax, dword [eax + 8]
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x20]
mov ecx, dword [edx + ecx*4 - 4]
push eax
lea edi, [esp + 0x18]
mov dword [esp + 0x1c], 6
call fcn.004017c0
mov edi, dword [esp + 0x18]
add esp, 4
cmp edi, 0xffffffff
je 0x401c85
mov eax, dword [esp + 0x10]
mov esi, 2
add eax, 0xfffffffe
cmp eax, esi
jle 0x401be1
mov ecx, dword [esp + 0x24]
mov dword [esp + 0x14], ecx
mov eax, dword [esp + 0x20]
mov ecx, dword [eax + esi*4]
lea edx, [esi + 7]
mov dword [esp + 0x18], edx
mov edx, dword [esp + 0x14]
mov ebx, dword [edx]
push ecx
push edi
call fcn.004014c0
add esp, 8
test eax, eax
je 0x401c85
mov eax, dword [esp + 0x10]
add dword [esp + 0x14], 0x20c
inc esi
add eax, 0xfffffffe
cmp esi, eax
jl 0x401ba7
mov ecx, dword [esp + 0x1c]
mov esi, dword [sym.imp.KERNEL32.dll_WriteFile]
xor ebx, ebx
push ebx
lea edx, [esp + 0x10]
push edx
push 4
lea eax, [esp + 0x34]
push eax
xor ecx, 0x4a534453
push edi
mov dword [esp + 0x2c], 0x3e8
mov dword [esp + 0x20], ebx
mov dword [esp + 0x3c], ecx
call esi
test eax, eax
je 0x401c85
cmp dword [esp + 0xc], 4
jne 0x401c85
mov edx, dword [esp + 0x1c]
mov eax, dword [esp + 0x24]
imul edx, edx, 0x20c
push ebx
lea ecx, [esp + 0x10]
push ecx
push edx
push eax
push edi
call esi
test eax, eax
je 0x401c85
mov ecx, dword [esp + 0x1c]
imul ecx, ecx, 0x20c
cmp ecx, dword [esp + 0xc]
jne 0x401c85
push ebx
lea edx, [esp + 0x10]
push edx
push 4
lea eax, [esp + 0x28]
push eax
push edi
call esi
test eax, eax
je 0x401c85
cmp dword [esp + 0xc], 4
jne 0x401c85
push ebx
lea ecx, [esp + 0x10]
push ecx
push 4
push str.SDSJ
push edi
call esi
test eax, eax
je 0x401c85
cmp dword [esp + 0xc], 4
jne 0x401c85
mov dword [esp + 0x18], ebx
mov edx, dword [esp + 0x20]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, dword [esp + 0x24]
push eax
call fcn.00402d4d
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x230]
xor ecx, esp
call fcn.00402b02
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov eax, 2
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x230]
xor ecx, esp
call fcn.00402b02
mov esp, ebp
pop ebp
ret
push edi
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [esp + 0x23c]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 1
call fcn.00402b02
mov esp, ebp
pop ebp
ret