Function at 0x4077b1
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.0040811d
push edi
mov ebx, eax
xor edi, edi
push edi
push ebx
mov dword [ebp - 0x18], ebx
call fcn.00406310
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.004086a5
add esp, 0xc
test al, al
jne 0x40780b
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 0x4078ae
mov eax, dword [esi + 4]
mov ecx, 0x4017cc
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407858
test dx, dx
je 0x407854
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407858
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407834
xor eax, eax
jmp 0x40785d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407868
mov byte [0x40a018], 1
cmp dword [ebp - 0xc], edi
jle 0x4078ae
mov eax, dword [esi + 4]
mov ecx, 0x4017ac
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407899
test dx, dx
je 0x407895
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407899
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407875
xor eax, eax
jmp 0x40789e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4078ae
mov byte [ebp - 2], 1
mov dword [ebp - 0x10], edi
jmp 0x407a48
cmp dword [ebp - 0xc], 1
jle 0x4079c6
mov eax, dword [ebp - 8]
mov edi, dword [eax + 4]
mov esi, 0x401778
mov ecx, esi
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4078eb
test dx, dx
je 0x4078e7
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4078eb
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x4078c7
xor eax, eax
jmp 0x4078f0
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407981
mov eax, dword [ebp - 8]
mov esi, dword [eax + 8]
mov ecx, 0x401750
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407929
test dx, dx
je 0x407925
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407929
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407905
xor eax, eax
jmp 0x40792e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40793e
mov dword [ebp - 0x14], 0xb
jmp 0x407a48
mov ecx, 0x40171c
mov eax, esi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407969
test dx, dx
je 0x407965
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407969
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407945
xor eax, eax
jmp 0x40796e
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x40797e
mov dword [ebp - 0x14], 0x1e
jmp 0x407a48
push esi
jmp 0x4079b8
mov ecx, esi
mov eax, edi
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x4079a9
test dx, dx
je 0x4079a5
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x4079a9
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407985
xor eax, eax
jmp 0x4079ae
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4079c6
mov eax, dword [ebp - 8]
push dword [eax + 8]
call fcn.00408266
pop ecx
mov dword [ebp - 0x14], eax
jmp 0x407a48
cmp word [section..MAIN], 0
jne 0x4079ed
push section..MAIN
call fcn.00408b97
test al, al
pop ecx
jne 0x4079e7
push 0xa
pop eax
jmp 0x407b2e
mov byte [ebp - 1], 1
jmp 0x407a48
push 2
pop esi
cmp dword [ebp - 0xc], esi
jl 0x407b2b
mov eax, dword [ebp - 8]
mov eax, dword [eax + 4]
mov ecx, 0x401628
mov dx, word [eax]
cmp dx, word [ecx]
jne 0x407a28
test dx, dx
je 0x407a24
mov dx, word [eax + 2]
cmp dx, word [ecx + 2]
jne 0x407a28
add eax, ebx
add ecx, ebx
test dx, dx
jne 0x407a04
xor eax, eax
jmp 0x407a2d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407b2b
push section..MAIN
mov dword [ebp - 0x10], esi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
cmp eax, 1
jne 0x4079df
mov eax, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x10]
cmp eax, ecx
mov esi, dword [ebp - 0x18]
jle 0x407a71
push 0x410
sub eax, ecx
push esi
push eax
mov eax, dword [ebp - 8]
lea eax, [eax + ecx*4]
push eax
call fcn.004086bd
add esp, 0x10
test al, al
jne 0x407a75
and word [esi], 0
push esi
call fcn.00407344
mov edi, eax
test edi, edi
pop ecx
jne 0x407a89
push 0x17
jmp 0x4079e1
mov esi, 0x40a028
mov ecx, esi
call fcn.0040806e
test eax, eax
je 0x407ac2
lea eax, [ebp - 0x220]
push eax
mov ecx, esi
call fcn.0040806e
push eax
call fcn.00408b53
pop ecx
pop ecx
lea eax, [ebp - 0x220]
push eax
push 0x4015e0
mov ecx, edi
call fcn.00408ddc
cmp byte [ebp - 2], 0
je 0x407ade
or dword [ebp - 0x10], 0xffffffff
lea eax, [ebp - 0x10]
push eax
push edi
push dword [ebp - 0x18]
call fcn.004068f8
add esp, 0xc
jmp 0x407ae9
push dword [ebp - 0x14]
push edi
call fcn.00407560
pop ecx
pop ecx
cmp byte [ebp - 1], 0
je 0x407b06
mov esi, section..MAIN
push esi
call fcn.0040873c
test al, al
pop ecx
jne 0x407b06
push esi
call fcn.00408906
pop ecx
cmp dword [ebp - 8], 0
je 0x407b15
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push 1
mov ecx, edi
call fcn.00407792
push dword [ebp - 0x18]
call fcn.0040812d
pop ecx
xor eax, eax
jmp 0x407b2e
or eax, 0xffffffff
pop edi
pop esi
pop ebx
leave
ret