Function at 0x407543
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.00407e5a
push edi
mov ebx, eax
xor edi, edi
push edi
push ebx
mov dword [ebp - 0x18], ebx
call fcn.00406260
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.004083e2
add esp, 0xc
test al, al
jne 0x40759d
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 0x407640
mov eax, dword [esi + 4]
mov ecx, 0x401718
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4075ea
test dx, dx
je 0x4075e6
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4075ea
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x4075c6
xor eax, eax
jmp 0x4075ef
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4075fa
mov byte [0x40a018], 1
cmp dword [ebp - 0xc], edi
jle 0x407640
mov eax, dword [esi + 4]
mov ecx, 0x4016f8
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40762b
test dx, dx
je 0x407627
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40762b
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407607
xor eax, eax
jmp 0x407630
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407640
mov byte [ebp - 2], 1
mov dword [ebp - 0x10], edi
jmp 0x4077da
cmp dword [ebp - 0xc], 1
jle 0x407758
mov eax, dword [ebp - 8]
mov edi, dword [eax + 4]
mov esi, 0x4016c4
mov ecx, esi
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x40767d
test dx, dx
je 0x407679
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x40767d
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407659
xor eax, eax
jmp 0x407682
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407713
mov eax, dword [ebp - 8]
mov esi, dword [eax + 8]
mov ecx, 0x40169c
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4076bb
test dx, dx
je 0x4076b7
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4076bb
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407697
xor eax, eax
jmp 0x4076c0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4076d0
mov dword [ebp - 0x14], 0xb
jmp 0x4077da
mov ecx, 0x401668
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], 0x1e
jmp 0x4077da
push esi
jmp 0x40774a
mov ecx, esi
mov eax, edi
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 0x407758
mov eax, dword [ebp - 8]
push dword [eax + 8]
call fcn.00407fa3
pop ecx
mov dword [ebp - 0x14], eax
jmp 0x4077da
cmp word [section..MAIN], 0
jne 0x40777f
push section..MAIN
call fcn.004088d4
test al, al
pop ecx
jne 0x407779
push 0xa
pop eax
jmp 0x4078c0
mov byte [ebp - 1], 1
jmp 0x4077da
push 2
pop esi
cmp dword [ebp - 0xc], esi
jl 0x4078bd
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
mov ecx, 0x4015f0
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4077ba
test dx, dx
je 0x4077b6
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4077ba
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407796
xor eax, eax
jmp 0x4077bf
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4078bd
push section..MAIN
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp eax, 1
jne 0x407771
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
cmp eax, ecx
mov esi, dword [ebp - 0x18]
jle 0x407803
push 0x410
sub eax, ecx
push esi
push eax
mov eax, dword [ebp - 8]
lea eax, [eax + ecx*4]
push eax
call fcn.004083fa
add esp, 0x10
test al, al
jne 0x407807
and word [esi], 0
push esi
call fcn.00407294
mov edi, eax
test edi, edi
pop ecx
jne 0x40781b
push 0x17
jmp 0x407773
mov esi, 0x40a028
mov ecx, esi
call fcn.00407dab
test eax, eax
je 0x407854
lea eax, [ebp - 0x220]
push eax
mov ecx, esi
call fcn.00407dab
push eax
call fcn.00408890
pop ecx
pop ecx
lea eax, [ebp - 0x220]
push eax
push 0x4015a8
mov ecx, edi
call fcn.00408b19
cmp byte [ebp - 2], 0
je 0x407870
or dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x10]
push eax
push edi
push dword [ebp - 0x18]
call fcn.00406848
add esp, 0xc
jmp 0x40787b
push dword [ebp - 0x14]
push edi
call fcn.004074b0
pop ecx
pop ecx
cmp byte [ebp - 1], 0
je 0x407898
mov esi, section..MAIN
push esi
call fcn.00408479
test al, al
pop ecx
jne 0x407898
push esi
call fcn.00408643
pop ecx
cmp dword [ebp - 8], 0
je 0x4078a7
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 1
mov ecx, edi
call fcn.00407524
push dword [ebp - 0x18]
call fcn.00407e6a
pop ecx
xor eax, eax
jmp 0x4078c0
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret