Function at 0x407583
Capabilities:
Accept command line arguments
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x220
push ebx
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetCommandLineW]
push edi
call esi
and dword [ebp - 8], 0
and dword [ebp - 0xc], 0
mov edi, 0x820
push edi
call fcn.00407e8e
push edi
mov ebx, eax
xor edi, edi
push edi
push ebx
mov dword [ebp - 0x18], ebx
call fcn.004062a0
or dword [ebp - 0x14], 0xffffffff
add esp, 0x10
lea eax, [ebp - 0xc]
push eax
lea eax, [ebp - 8]
push eax
call esi
push eax
call fcn.00408401
add esp, 0xc
test al, al
jne 0x4075dd
mov word [ebx], di
mov dword [ebp - 0xc], edi
mov esi, dword [ebp - 8]
push 4
pop ebx
push 2
pop edi
cmp dword [ebp - 0xc], edi
mov dword [ebp - 0x10], 1
mov byte [ebp - 1], 0
mov byte [ebp - 2], 0
jl 0x407680
mov eax, dword [esi + 4]
mov ecx, 0x40172c
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40762a
test dx, dx
je 0x407626
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40762a
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407606
xor eax, eax
jmp 0x40762f
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40763a
mov byte [0x40a018], 1
cmp dword [ebp - 0xc], edi
jle 0x407680
mov eax, dword [esi + 4]
mov ecx, 0x40170c
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40766b
test dx, dx
je 0x407667
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40766b
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407647
xor eax, eax
jmp 0x407670
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407680
mov byte [ebp - 2], 1
mov dword [ebp - 0x10], edi
jmp 0x40781a
cmp dword [ebp - 0xc], 1
jle 0x407798
mov eax, dword [ebp - 8]
mov edi, dword [eax + 4]
mov esi, 0x4016d8
mov ecx, esi
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4076bd
test dx, dx
je 0x4076b9
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4076bd
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407699
xor eax, eax
jmp 0x4076c2
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407753
mov eax, dword [ebp - 8]
mov esi, dword [eax + 8]
mov ecx, 0x4016b0
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4076fb
test dx, dx
je 0x4076f7
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4076fb
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x4076d7
xor eax, eax
jmp 0x407700
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407710
mov dword [ebp - 0x14], 0xb
jmp 0x40781a
mov ecx, 0x40167c
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40773b
test dx, dx
je 0x407737
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40773b
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407717
xor eax, eax
jmp 0x407740
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407750
mov dword [ebp - 0x14], 0x1e
jmp 0x40781a
push esi
jmp 0x40778a
mov ecx, esi
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40777b
test dx, dx
je 0x407777
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40777b
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407757
xor eax, eax
jmp 0x407780
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407798
mov eax, dword [ebp - 8]
push dword [eax + 8]
call fcn.00407fd7
pop ecx
mov dword [ebp - 0x14], eax
jmp 0x40781a
cmp word [section..MAIN], 0
jne 0x4077bf
push section..MAIN
call fcn.004086a6
test al, al
pop ecx
jne 0x4077b9
push 0xa
pop eax
jmp 0x4078f4
mov byte [ebp - 1], 1
jmp 0x40781a
push 2
pop esi
cmp dword [ebp - 0xc], esi
jl 0x4078f1
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
mov ecx, 0x401604
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4077fa
test dx, dx
je 0x4077f6
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4077fa
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x4077d6
xor eax, eax
jmp 0x4077ff
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4078f1
push section..MAIN
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp eax, 1
jne 0x4077b1
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
cmp eax, ecx
mov esi, dword [ebp - 0x18]
jle 0x407843
push 0x410
sub eax, ecx
push esi
push eax
mov eax, dword [ebp - 8]
lea eax, [eax + ecx*4]
push eax
call fcn.00408419
add esp, 0x10
test al, al
jne 0x407847
and word [esi], 0
push esi
call fcn.004072d4
mov edi, eax
test edi, edi
pop ecx
jne 0x40785b
push 0x17
jmp 0x4077b3
mov esi, 0x40a028
mov ecx, esi
call fcn.00407ddf
test eax, eax
je 0x407894
lea eax, [ebp - 0x220]
push eax
mov ecx, esi
call fcn.00407ddf
push eax
call fcn.00408662
pop ecx
pop ecx
lea eax, [ebp - 0x220]
push eax
push 0x4015bc
mov ecx, edi
call fcn.004088eb
cmp byte [ebp - 2], 0
je 0x4078b0
or dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x10]
push eax
push edi
push dword [ebp - 0x18]
call fcn.00406888
add esp, 0xc
jmp 0x4078bb
push dword [ebp - 0x14]
push edi
call fcn.004074f0
pop ecx
pop ecx
cmp byte [ebp - 1], 0
je 0x4078cc
push section..MAIN
call fcn.00408498
pop ecx
cmp dword [ebp - 8], 0
je 0x4078db
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 1
mov ecx, edi
call fcn.00407564
push dword [ebp - 0x18]
call fcn.00407e9e
pop ecx
xor eax, eax
jmp 0x4078f4
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret