Function at 0x4598f6
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x144c
call fcn.00483980
push ebx
push esi
mov esi, dword [ebp + 0xc]
mov ecx, dword [esi]
mov eax, 0xc7
cmp ecx, eax
push edi
ja 0x459ab6
je 0x459a57
sub ecx, 0x64
je 0x459a41
sub ecx, 3
je 0x459a33
sub ecx, 6
je 0x4599d3
sub ecx, 0x14
je 0x459989
dec ecx
dec ecx
jne 0x459ade
xor edi, edi
push edi
push edi
push 1
push dword [esi + 8]
call fcn.0043e44d
pop ecx
pop ecx
push eax
lea ecx, [ebp - 0x18]
call fcn.00402b8d
mov ebx, dword [eax]
push edi
push edi
push dword [esi + 8]
lea ecx, [ebp - 4]
call fcn.00402b8d
push ebx
push dword [eax]
call fcn.00471a46
push dword [ebp - 4]
mov esi, dword [sym.imp.NSCRT.dll_free]
call esi
push dword [ebp - 0x18]
mov dword [ebp - 4], edi
jmp 0x4599c9
xor edi, edi
push edi
push dword [esi + 8]
lea ecx, [ebp - 0x1c]
call fcn.00402d0e
mov eax, dword [eax]
push edi
push edi
push 1
push eax
call fcn.0043e44d
pop ecx
pop ecx
push eax
lea ecx, [ebp - 8]
call fcn.00402b8d
push dword [eax]
push dword [esi + 8]
call fcn.00471a46
push dword [ebp - 8]
mov esi, dword [sym.imp.NSCRT.dll_free]
call esi
push dword [ebp - 0x1c]
mov dword [ebp - 8], edi
call esi
add esp, 0x10
jmp 0x459c26
push 0x200
lea eax, [ebp - 0x22c]
push eax
push dword [0x4b0600]
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
mov edi, dword [sym.imp.KERNEL32.dll_GetShortPathNameA]
mov ebx, 0x1ff
push ebx
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x22c]
push eax
call edi
push ebx
lea eax, [ebp - 0x22c]
push eax
push dword [esi + 8]
call edi
lea eax, [ebp - 0x42c]
push eax
lea eax, [ebp - 0x22c]
push eax
call dword [sym.imp.NSCRT.dll__stricmp]
pop ecx
mov dword [0x49c938], eax
jmp 0x459c25
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
jmp 0x459c26
push dword [esi + 8]
lea ecx, [ebp - 0x144c]
call fcn.0040979b
push 0
push eax
jmp 0x459bb4
mov eax, dword [esi + 8]
xor edi, edi
cmp eax, edi
je 0x459c26
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
test eax, eax
je 0x459c26
push dword [esi + 8]
mov ebx, 0x4a0298
push ebx
call dword [sym.imp.NSCRT.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
je 0x459c26
push dword [esi + 8]
push 0x104
push ebx
call fcn.0047aaff
push edi
push 0x9d63
push 0x111
push dword [0x4ac344]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x459c26
sub ecx, 0xc8
je 0x459bc2
sub ecx, 0x384
je 0x459baf
sub ecx, 0x787
je 0x459b31
sub ecx, 4
je 0x459af9
dec ecx
je 0x459ae5
xor eax, eax
jmp 0x459c29
push dword [esi + 8]
push dword [0x4ac344]
call fcn.00463b2f
pop ecx
jmp 0x459c25
mov eax, 0x4b0a20
push eax
mov dword [ebp - 0xc], eax
call dword [sym.imp.NSCRT.dll_wcslen]
lea eax, [eax + eax + 2]
pop ecx
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x14]
push eax
push dword [0x4ac344]
mov dword [ebp - 0x14], 0xbd7
push 0x4a
push dword [ebp + 8]
call dword [sym.imp.USER32.dll_SendMessageA]
jmp 0x459c29
mov esi, dword [esi + 8]
push esi
call dword [sym.imp.NSCRT.dll_wcslen]
and word [ebp - 0xc2c], 0
lea eax, [esi + eax*2 + 2]
pop ecx
mov dword [ebp - 0x28], eax
xor eax, eax
mov ecx, 0x1ff
lea edi, [ebp - 0xc2a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
lea eax, [ebp - 0xc2c]
mov edi, 0xbd3
push edi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x24], eax
mov eax, 0x400
push ecx
push eax
push dword [0x4ac344]
mov dword [ebp - 0x2c], esi
mov esi, dword [sym.imp.USER32.dll_SendMessageA]
mov dword [ebp - 0x20], eax
call esi
lea eax, [ebp - 0xc2c]
mov dword [ebp - 0xc], eax
lea eax, [ebp - 0x14]
push eax
push dword [0x4ac344]
mov dword [ebp - 0x10], 0x800
push 0x4a
push dword [ebp + 8]
mov dword [ebp - 0x14], edi
call esi
jmp 0x459c29
push 0
push dword [esi + 8]
call fcn.0043fc9b
pop ecx
pop ecx
call fcn.00440030
jmp 0x459c26
mov eax, dword [esi + 8]
xor edi, edi
cmp eax, edi
je 0x459c26
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
test eax, eax
je 0x459c26
push edi
push dword [esi + 8]
lea ecx, [ebp + 0xc]
call fcn.00402d0e
push dword [ebp + 0xc]
mov ebx, 0x4a0298
push ebx
call dword [sym.imp.NSCRT.dll__wcsicmp]
test eax, eax
pop ecx
pop ecx
je 0x459c1c
push dword [ebp + 0xc]
push 0x104
push ebx
call fcn.0047aaff
push edi
push 0x9d63
push 0x111
push dword [0x4ac344]
call dword [sym.imp.USER32.dll_SendMessageA]
push dword [ebp + 0xc]
call dword [sym.imp.NSCRT.dll_free]
pop ecx
xor eax, eax
inc eax
pop edi
pop esi
pop ebx
leave
ret