Function at 0x45e430
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x52d5b6
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x420
mov eax, dword [0x58ada8]
push ebx
push esi
push edi
mov ecx, 0x58ada8
call dword [eax + 0xc]
lea esi, [eax + 0x10]
mov dword [esp + 0x10], esi
mov eax, dword [0x58a840]
xor ebx, ebx
test ah, ah
mov dword [esp + 0x434], ebx
js 0x45e567
xor eax, eax
mov word [esp + 0x220], bx
mov ecx, 0x81
lea edi, [esp + 0x222]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
xor eax, eax
mov word [esp + 0x18], bx
mov ecx, 0x81
lea edi, [esp + 0x1a]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0x14]
push ecx
lea edx, [esp + 0x224]
push edx
stosw word es:[edi], ax
mov eax, dword [ebp + 8]
push 0x104
push eax
call dword [sym.imp.KERNEL32.DLL_GetFullPathNameW]
test eax, eax
jne 0x45e4f0
call fcn.004368a0
mov edi, eax
lea eax, [esi - 0x10]
mov dword [esp + 0x434], 0xffffffff
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jmp 0x45e52e
push 0x104
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x228]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetLongPathNameW]
test eax, eax
jne 0x45e551
call fcn.004368a0
mov edi, eax
lea eax, [esi - 0x10]
mov dword [esp + 0x434], 0xffffffff
lea edx, [eax + 0xc]
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x45e538
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, edi
mov ecx, dword [esp + 0x42c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x18]
push eax
lea ecx, [esp + 0x14]
call fcn.00404350
or edi, 0xffffffff
jmp 0x45e670
xor eax, eax
mov byte [esp + 0x18], 0
mov ecx, 0x40
lea edi, [esp + 0x19]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov byte [esp + 0x220], 0
xor eax, eax
mov ecx, 0x40
lea edi, [esp + 0x221]
rep stosd dword es:[edi], eax
mov ecx, dword [ebp + 8]
stosw word es:[edi], ax
push ecx
lea ecx, [esp + 0x10]
stosb byte es:[edi], al
call fcn.004363e0
mov eax, dword [eax]
lea edx, [esp + 0x14]
push edx
lea ecx, [esp + 0x1c]
push ecx
push 0x104
push eax
call dword [sym.imp.KERNEL32.DLL_GetFullPathNameA]
mov ebx, eax
mov eax, dword [esp + 0xc]
neg ebx
sbb bl, bl
add eax, 0xfffffff0
or edi, 0xffffffff
inc bl
lea edx, [eax + 0xc]
mov ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x45e5e4
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
test bl, bl
je 0x45e603
call fcn.004368a0
mov ebx, eax
lea eax, [esi - 0x10]
mov dword [esp + 0x434], edi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
jmp 0x45e638
push 0x104
lea eax, [esp + 0x224]
push eax
lea ecx, [esp + 0x20]
push ecx
call dword [sym.imp.KERNEL32.DLL_GetLongPathNameA]
test eax, eax
jne 0x45e65d
call fcn.004368a0
mov ebx, eax
lea eax, [esi - 0x10]
mov dword [esp + 0x434], edi
lea edx, [eax + 0xc]
lock xadd dword [edx], edi
dec edi
test edi, edi
jg 0x45e644
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, ebx
mov ecx, dword [esp + 0x42c]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
lea eax, [esp + 0x220]
push eax
lea ecx, [esp + 0x14]
call fcn.004044b0
xor ebx, ebx
lea ecx, [esp + 0x10]
push ecx
mov ecx, 0x5877a4
call fcn.0040f010
mov edx, dword [0x5877a4]
push 0x5c
push edx
call fcn.004bd4ea
add esp, 8
cmp eax, ebx
jne 0x45e698
mov eax, edi
jmp 0x45e6a0
sub eax, dword [0x5877a4]
sar eax, 1
inc eax
push eax
lea eax, [esp + 0x10]
push eax
mov ecx, 0x5877a4
call fcn.00429770
push eax
mov ecx, 0x5877a0
mov byte [esp + 0x438], 1
call fcn.0040f010
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
mov byte [esp + 0x434], 0
lea ecx, [eax + 0xc]
mov edx, edi
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x45e6e9
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [0x58a840]
test ah, ah
js 0x45e700
mov eax, dword [0x5877a0]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryW]
jmp 0x45e736
mov ecx, dword [0x5877a0]
push ecx
lea ecx, [esp + 0x10]
call fcn.004363e0
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
mov eax, dword [esp + 0xc]
add eax, 0xfffffff0
lea edx, [eax + 0xc]
mov ecx, edi
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x45e736
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov eax, dword [esp + 0x10]
add eax, 0xfffffff0
mov dword [esp + 0x434], edi
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edi
dec edi
test edi, edi
jg 0x45e758
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
call dword [edx + 4]
mov ecx, dword [esp + 0x42c]
pop edi
pop esi
xor eax, eax
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 4