Function at 0x4019b0
Capabilities:
Accept command line arguments
Create process on windows
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
mov eax, dword [ebp + 8]
sub esp, 0x78
mov dword [0x4171e0], eax
push ebx
push esi
push edi
push 2
push 0x104
call fcn.004063ae
mov esi, eax
push 2
push 0x104
mov dword [0x4171e4], esi
call fcn.004063ae
mov ebx, eax
push 2
push 0x104
mov dword [0x4171e8], ebx
call fcn.004063ae
mov edi, eax
push 2
push 0x2000
mov dword [0x4171f8], edi
call fcn.004063ae
add esp, 0x20
mov dword [0x4171f4], eax
test esi, esi
je 0x401fa3
test ebx, ebx
je 0x401fa3
test edi, edi
je 0x401fa3
test eax, eax
je 0x401fa3
mov edi, dword [ebp + 8]
push 0x104
push esi
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
call fcn.00401230
mov ebx, eax
test ebx, ebx
jne 0x401ef5
call fcn.004012c0
mov dword [ebp - 8], eax
test eax, eax
jne 0x401cbf
push dword [0x4171e8]
mov ebx, dword [sym.imp.USER32.dll_wsprintfW]
push str.__s_
push dword [0x4171f4]
call ebx
add esp, 0xc
call dword [sym.imp.KERNEL32.dll_GetCommandLineW]
mov esi, eax
cmp word [esi], 0x22
jne 0x401a92
push 0x22
lea ecx, [esi + 2]
push ecx
jmp 0x401a95
push 0x20
push esi
call fcn.00405df0
mov edx, eax
add esp, 8
test edx, edx
jne 0x401aa7
mov edx, esi
jmp 0x401aaa
add edx, 2
test edx, edx
je 0x401b0a
cmp word [edx], 0
je 0x401b0a
mov edi, dword [0x4171f4]
add edi, 0xfffffffe
lea ecx, [ecx]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x401ac0
mov eax, dword [0x40f1e8]
mov dword [edi], eax
mov esi, edx
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x401ad5
mov edi, dword [0x4171f4]
sub edx, esi
add edi, 0xfffffffe
jmp 0x401af0
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x401af0
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [0x4171f4]
add ecx, 0xfffffffe
mov ax, word [ecx + 2]
lea ecx, [ecx + 2]
test ax, ax
jne 0x401b13
mov eax, dword [0x40f1ec]
mov dword [ecx], eax
mov eax, dword [str.SF__]
mov dword [ecx + 4], eax
mov eax, dword [0x40f1f4]
mov dword [ecx + 8], eax
mov ax, word [0x40f1f8]
mov word [ecx + 0xc], ax
mov edx, dword [0x4171e4]
mov esi, edx
jmp 0x401b50
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x401b50
mov edi, dword [0x4171f4]
sub edx, esi
add edi, 0xfffffffe
mov ax, word [edi + 2]
add edi, 2
test ax, ax
jne 0x401b66
mov ecx, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [0x4171f4]
add edi, 0xfffffffe
lea esp, [esp]
mov ax, word [edi + 2]
lea edi, [edi + 2]
test ax, ax
jne 0x401b90
mov eax, dword [0x40f1fc]
mov dword [edi], eax
mov edx, dword [0x4171f4]
mov ecx, edx
lea esi, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401bb0
push dword [0x4171ec]
sub ecx, esi
sar ecx, 1
push 0x40f200
lea eax, [edx + ecx*2]
push eax
call ebx
push 0x44
lea eax, [ebp - 0x78]
push 0
push eax
call fcn.004065e0
add esp, 0x18
lea eax, [ebp - 0x18]
push eax
lea eax, [ebp - 0x78]
push eax
push 0
push 0
push 0x20
push 1
push 0
push 0
push dword [0x4171f4]
xorps xmm0, xmm0
push 0
mov dword [ebp - 0x78], 0x44
movq qword [ebp - 0x18], xmm0
movq qword [ebp - 0x10], xmm0
call dword [sym.imp.KERNEL32.dll_CreateProcessW]
test eax, eax
je 0x401cbf
mov edi, dword [sym.imp.USER32.dll_PeekMessageW]
mov ebx, dword [sym.imp.USER32.dll_GetMessageW]
xor esi, esi
lea esp, [esp]
test esi, esi
jne 0x401c7f
push esi
push esi
push esi
push esi
lea eax, [ebp - 0x34]
push eax
call edi
test eax, eax
je 0x401c7f
push 0
push 0
push 0
lea eax, [ebp - 0x34]
push eax
call ebx
test eax, eax
je 0x401c68
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.USER32.dll_TranslateMessage]
lea eax, [ebp - 0x34]
push eax
call dword [sym.imp.USER32.dll_DispatchMessageW]
jmp 0x401c6d
mov esi, 1
push 0
push 0
push 0
push 0
lea eax, [ebp - 0x34]
push eax
call edi
test eax, eax
jne 0x401c42
lea eax, [ebp - 4]
push eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_GetExitCodeProcess]
test eax, eax
je 0x401caf
push 0x4ff
push 0x3e8
push 0
push 0
push 0
call dword [sym.imp.USER32.dll_MsgWaitForMultipleObjects]
cmp dword [ebp - 4], 0x103
je 0x401c30
push dword [ebp - 0x14]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
call esi
push dword [ebp - 0x18]
call esi
mov eax, dword [0x4171e4]
test eax, eax
je 0x401cff
push 0x5c
push eax
call fcn.00405ee1
add esp, 8
test eax, eax
je 0x401cff
mov ecx, eax
sub ecx, dword [0x4171e4]
sar ecx, 1
cmp ecx, 3
jae 0x401cee
xor ecx, ecx
mov word [eax + 2], cx
jmp 0x401cf3
xor ecx, ecx
mov word [eax], cx
push dword [0x4171e4]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov edi, dword [0x4171f0]
mov ebx, dword [sym.imp.KERNEL32.dll_Sleep]
test edi, edi
je 0x401ded
cmp word [edi], 0
je 0x401de4
lea ecx, [ecx]
xor esi, esi
push edi
call fcn.00406424
add esp, 4
test eax, eax
je 0x401d48
call fcn.0040635a
cmp dword [eax], 2
je 0x401d48
push 0x3e8
call ebx
inc esi
cmp esi, 0xa
jl 0x401d22
jmp 0x401db5
mov ecx, edi
lea edx, [ecx + 2]
lea ecx, [ecx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401d50
sub ecx, edx
sar ecx, 1
push 2
lea eax, [ecx + 1]
push eax
call fcn.004063ae
mov esi, eax
add esp, 8
test esi, esi
je 0x401db5
mov edx, esi
mov ecx, edi
sub edx, edi
lea esp, [esp]
movzx eax, word [ecx]
mov word [edx + ecx], ax
lea ecx, [ecx + 2]
test ax, ax
jne 0x401d80
push 0x5c
push esi
call fcn.00405ee1
add esp, 8
test eax, eax
je 0x401dac
xor ecx, ecx
push esi
mov word [eax], cx
call fcn.004065a0
add esp, 4
push esi
call fcn.004063ec
add esp, 4
mov ecx, edi
lea edx, [ecx + 2]
lea ebx, [ebx]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401dc0
sub ecx, edx
sar ecx, 1
lea edi, [edi + ecx*2]
add edi, 2
cmp word [edi], ax
jne 0x401d20
mov edi, dword [0x4171f0]
push edi
call fcn.004063ec
add esp, 4
push 2
push 0x104
call fcn.004063ae
mov esi, eax
add esp, 8
test esi, esi
je 0x401e8d
push esi
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x401e84
mov ecx, esi
lea edx, [ecx + 2]
jmp 0x401e20
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401e20
sub ecx, edx
sar ecx, 1
push ecx
push dword [0x4171f8]
push esi
call fcn.0040617b
add esp, 0xc
test eax, eax
jne 0x401e84
mov edi, dword [0x4171f8]
mov ecx, edi
lea edx, [ecx + 2]
mov edi, edi
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401e50
sub ecx, edx
mov edx, esi
sar ecx, 1
lea eax, [edx + 2]
mov dword [ebp - 4], eax
mov ax, word [edx]
add edx, 2
test ax, ax
jne 0x401e67
sub edx, dword [ebp - 4]
sar edx, 1
cmp ecx, edx
jbe 0x401e84
push edi
call fcn.004017c0
add esp, 4
push esi
call fcn.004063ec
add esp, 4
xor esi, esi
nop
mov edx, dword [0x4171f8]
mov ecx, edx
lea edi, [ecx + 2]
jmp 0x401ea0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x401ea0
sub ecx, edi
sar ecx, 1
cmp ecx, 3
jle 0x401ecb
cmp word [edx + ecx*2 - 2], 0x5c
lea eax, [edx + ecx*2]
jne 0x401ecb
xor ecx, ecx
mov word [eax - 2], cx
mov edx, dword [0x4171f8]
push edx
call fcn.004065a0
add esp, 4
test eax, eax
je 0x401eef
call fcn.0040635a
cmp dword [eax], 2
je 0x401eef
push 0x3e8
call ebx
inc esi
cmp esi, 0xa
jl 0x401e90
mov ebx, dword [ebp - 8]
mov edi, dword [ebp + 8]
cmp ebx, 0x40000000
jl case.default.0x401f08
lea eax, [ebx - 0x40000001]
cmp eax, 3
ja case.default.0x401f08
jmp dword [eax*4 + 0x401fb0]
mov ebx, 2
jmp 0x401f2d
mov ebx, 6
jmp 0x401f2d
mov ebx, 7
jmp 0x401f2d
test ebx, ebx
jle 0x401f69
cmp ebx, 8
jge 0x401f69
push 2
push 0x104
call fcn.004063ae
movsx ecx, byte [ebx + section..data]
add esp, 8
mov esi, eax
push 0x104
push esi
push ecx
push edi
call dword [sym.imp.USER32.dll_LoadStringW]
push 0x40
push 0
push esi
push 0
call dword [sym.imp.USER32.dll_MessageBoxW]
push esi
call fcn.004063ec
add esp, 4
push dword [0x4171f4]
call fcn.004063ec
push dword [0x4171f8]
call fcn.004063ec
push dword [0x4171e8]
call fcn.004063ec
push dword [0x4171e4]
call fcn.004063ec
add esp, 0x10
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10
pop edi
pop esi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret 0x10