Function at 0x4050c6
Capabilities:
Set current directory

Disassembly:
push ebp
lea ebp, [esp - 0x388]
sub esp, 0x408
mov eax, dword [0x4122b0]
xor eax, ebp
mov dword [ebp + 0x384], eax
mov eax, dword [ebp + 0x398]
or dword [0x41340a], 0xffffffff
push ebx
mov ebx, dword [ebp + 0x390]
push esi
push edi
mov dword [ebp - 0x80], ebx
mov dword [ebp - 0x74], eax
call dword [sym.imp.COMCTL32.dll_InitCommonControls]
call section..text
mov esi, dword [sym.imp.USER32.dll_LoadCursorA]
push 0x7f02
push 0
call esi
push 0x7f00
push 0
mov dword [0x413a3c], eax
call esi
mov dword [0x4133f8], eax
push 0x200
lea eax, [ebp - 0x70]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
test eax, eax
je 0x405157
lea ecx, [ebp - 0x70]
call fcn.0040113f
test eax, eax
je 0x40514d
mov byte [eax], 0
lea eax, [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
push 0x8001
mov dword [0x413220], ebx
call dword [sym.imp.KERNEL32.dll_SetErrorMode]
call dword [sym.imp.KERNEL32.dll_GetVersion]
push dword [0x41202c]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push 0x40
mov dword [ebp - 0x78], eax
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
call edi
push dword [0x41201c]
mov dword [0x413d88], eax
push 0x40
call esi
push eax
call edi
push dword [0x412020]
mov dword [0x413d78], eax
push 0x40
call esi
push eax
call edi
push dword [0x412030]
mov dword [0x413d7c], eax
push 0x40
call esi
push eax
call edi
push dword [0x412024]
mov dword [0x413d8c], eax
push 0x40
call esi
push eax
call edi
push dword [0x412018]
mov dword [0x413d80], eax
push 0x40
call esi
push eax
call edi
mov edi, 0x105
push edi
mov esi, 0x413c00
push esi
push ebx
mov dword [0x413d74], eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
push edi
push esi
call fcn.0040153f
xor ebx, ebx
push ebx
push 0x413a40
call fcn.0040728c
add esp, 0x10
test eax, eax
jne 0x405567
call fcn.00403a94
call fcn.004015ad
test eax, eax
jne 0x405252
push 0x10
mov ecx, 0x7d0
call fcn.0040207a
mov ecx, 0x41a
push eax
call fcn.0040207a
push eax
push dword [0x413d90]
call dword [sym.imp.USER32.dll_MessageBoxA]
jmp 0x405567
mov esi, dword [ebp - 0x74]
push 0x101
push ebx
push 0x4132f0
call fcn.004012be
add esp, 0xc
jmp 0x4052fe
push 5
push str._info
push esi
call fcn.004073f7
add esp, 0xc
test eax, eax
je 0x40534a
push 6
push str._args
push esi
call fcn.004073f7
add esp, 0xc
test eax, eax
je 0x4052ad
push 6
push 0x40f40c
push esi
call fcn.004073f7
add esp, 0xc
test eax, eax
jne 0x4052fd
lea edi, [esi + 6]
push edi
mov dword [ebp - 0x7c], esi
call fcn.004070f0
test eax, eax
pop ecx
je 0x405399
cmp byte [edi], 0x22
jne 0x405399
inc edi
mov al, byte [edi]
mov esi, edi
xor ecx, ecx
jmp 0x4052dc
cmp al, 0x22
je 0x4052e0
inc ecx
inc esi
mov al, byte [esi]
test al, al
jne 0x4052d4
cmp ecx, ebx
je 0x405362
cmp byte [esi], bl
je 0x405362
push ecx
push edi
push 0x101
push 0x4132f0
call fcn.004069fc
test eax, eax
jne 0x405362
inc esi
cmp byte [esi], bl
jne 0x40526d
xor esi, esi
inc esi
cmp dword [ebp - 0x78], 0x80000000
mov dword [0x413d98], ebx
jae 0x405324
cmp byte [ebp - 0x78], 4
jb 0x405324
mov dword [0x413d98], esi
cmp dword [0x413d98], ebx
jne 0x40539c
cmp byte [ebp - 0x78], 4
jae 0x40539c
push ebx
mov ecx, 0x7d0
call fcn.0040207a
push eax
mov ecx, 0x3f6
call fcn.0040207a
jmp 0x405396
push ebx
mov ecx, 0x7d0
call fcn.0040207a
push eax
push dword [0x413d8c]
push ebx
jmp 0x405247
push dword [ebp - 0x7c]
mov ecx, 0x42d
call fcn.0040207a
push eax
lea eax, [ebp + 0x190]
push 0x1f4
push eax
call fcn.00406a1f
add esp, 0x10
push ebx
mov ecx, 0x7d0
call fcn.0040207a
push eax
lea eax, [ebp + 0x190]
push eax
jmp 0x40535c
push esi
jmp 0x405365
cmp word [0x412066], bx
mov dword [0x413d98], esi
jne 0x4053c1
push 0x10
mov ecx, 0x7d0
call fcn.0040207a
mov ecx, 0x3e8
jmp 0x40523a
mov eax, dword [0x412058]
and al, 2
sub al, 2
neg al
push 4
push ebx
push dword [0x412038]
sbb eax, eax
inc eax
mov dword [0x412034], eax
call fcn.004012be
mov edx, dword [0x412058]
mov eax, dword [0x412038]
mov ecx, pe_nt_image_headers32
and edx, ecx
sub edx, ecx
add esp, 0xc
push dword [ebp - 0x80]
neg edx
sbb edx, edx
inc edx
xor edx, dword [eax + 0x28]
and edx, esi
xor dword [eax + 0x28], edx
call fcn.00405809
mov edx, dword [0x413d84]
cmp edx, ebx
mov ecx, dword [0x412058]
je 0x4054a4
test ecx, 0x400000
jne 0x4054a4
mov edi, ecx
and edi, 0x100000
mov eax, ecx
and eax, 0x80000
neg edi
sbb edi, edi
and edi, 0xfffffffd
add edi, 4
neg eax
sbb eax, eax
and eax, edi
test cl, 0x10
je 0x405462
mov ecx, dword [0x413d88]
cmp byte [ecx], bl
je 0x405462
or eax, 0x2000
push eax
push ecx
push edx
jmp 0x405479
or eax, 0x2000
push eax
mov ecx, 0x7d0
call fcn.0040207a
push eax
push dword [0x413d84]
push ebx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 7
je 0x405567
cmp eax, 2
je 0x405567
push dword [0x413d84]
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [0x412058]
test cx, 0x200
push dword [ebp - 0x74]
je 0x4054b4
mov dword [0x413d70], esi
call fcn.004033fd
pop ecx
push ebx
push 0x404677
push ebx
push 0x64
push dword [ebp - 0x80]
call dword [sym.imp.USER32.dll_DialogBoxParamA]
call fcn.00401e27
push dword [0x413d88]
mov esi, dword [sym.imp.KERNEL32.dll_GlobalHandle]
call esi
mov edi, dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push eax
call edi
push dword [0x413d88]
call esi
mov ebx, dword [sym.imp.KERNEL32.dll_GlobalFree]
push eax
call ebx
push dword [0x413d78]
call esi
push eax
call edi
push dword [0x413d78]
call esi
push eax
call ebx
push dword [0x413d7c]
call esi
push eax
call edi
push dword [0x413d7c]
call esi
push eax
call ebx
push dword [0x413d8c]
call esi
push eax
call edi
push dword [0x413d8c]
call esi
push eax
call ebx
push dword [0x413d80]
call esi
push eax
call edi
push dword [0x413d80]
call esi
push eax
call ebx
push dword [0x413d74]
call esi
push eax
call edi
push dword [0x413d74]
call esi
push eax
call ebx
mov ecx, dword [ebp + 0x384]
pop edi
pop esi
xor ecx, ebp
xor eax, eax
pop ebx
call fcn.00406bf6
add ebp, 0x388
leave
ret 0x10