Function at 0x4157c0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [esi + 0xa8c]
sub esp, 0x10
push ebx
push edi
xor edi, edi
mov byte [esi + 0x270], 1
mov word [esi + 0xaa4], 0
cmp eax, edi
je 0x415a89
cmp word [eax], di
je 0x415a89
cmp dword [0x4c30bc], edi
jne 0x41580a
call fcn.00468680
mov dword [0x4c30bc], eax
cmp eax, edi
je 0x41584f
mov ecx, dword [0x4c30c0]
cmp dword [ecx + 8], 0x10
jae 0x415828
call fcn.00468680
mov ecx, dword [0x4c30c0]
mov dword [ecx + 0xc], eax
cmp eax, edi
je 0x41584f
mov eax, dword [ecx + 4]
add dword [ecx + 8], 0xfffffff0
lea edx, [eax + 0x10]
mov dword [0x4c30c4], eax
mov dword [ecx + 4], edx
cmp eax, edi
je 0x41584f
mov dword [eax], 0x4a596c
mov dword [eax + 4], edi
mov dword [eax + 8], edi
mov dword [eax + 0xc], edi
jmp 0x415851
xor eax, eax
mov dword [esi + 0x630], eax
cmp eax, edi
je 0x415a89
mov eax, dword [esi + 0xa8c]
push eax
push esi
call fcn.00415c00
cmp eax, 1
jne 0x415a89
push edi
push edi
push edi
push 0x67
push esi
call fcn.0041b960
test eax, eax
je 0x415a89
xor eax, eax
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], eax
xor ebx, ebx
cmp ebx, dword [0x4c0ff4]
jge 0x4158d1
lea esp, [esp]
mov ecx, dword [0x4c0ff0]
mov edi, dword [ecx + ebx*4]
push 0
push 0
push edi
mov ecx, esi
call fcn.00422ac0
test eax, eax
je 0x415a89
inc ebx
mov byte [edi], 0x12
cmp ebx, dword [0x4c0ff4]
jl 0x4158a0
mov edi, dword [esp + 0xc]
mov eax, dword [esp + 0x10]
cmp eax, dword [esi + 0xc]
je 0x4158fd
test eax, eax
je 0x4158df
mov eax, dword [eax + 0x14]
jmp 0x4158e2
mov eax, dword [esi + 8]
push 0
push 0
push eax
mov ecx, esi
call fcn.00422ac0
test eax, eax
je 0x415a89
mov edx, dword [esi + 0xc]
mov dword [esp + 0x10], edx
cmp edi, dword [esi + 4]
je 0x415933
test edi, edi
je 0x41590b
mov eax, dword [edi + 0x14]
jmp 0x41590d
mov eax, dword [esi]
push 0
push 0
push eax
mov ecx, esi
call fcn.00422ac0
test eax, eax
je 0x415a89
mov eax, dword [esi + 4]
mov dword [esp + 0xc], eax
mov edi, eax
mov eax, dword [esp + 0x10]
jmp 0x415894
cmp dword [esi + 8], 0
je 0x41594e
mov edx, dword [esi]
mov ecx, dword [esi + 0xc]
mov dword [ecx + 0x14], edx
mov eax, dword [esi]
mov ecx, dword [esi + 0xc]
mov dword [eax + 0x10], ecx
mov edx, dword [esi + 8]
mov dword [esi], edx
cmp dword [0x4c0fbc], 0
je 0x4159b2
xor eax, eax
mov dword [esp + 0x10], eax
cmp dword [esi + 0x1c], eax
jle 0x4159b2
mov ecx, dword [esi + 0x18]
mov edi, dword [ecx + eax*4]
cmp byte [edi + 0x31], 0
jne 0x4159a4
xor ebx, ebx
cmp dword [edi + 0x20], ebx
jle 0x415989
mov edx, dword [edi + 0x18]
mov eax, dword [edx + ebx*4]
push esi
mov ecx, edi
call fcn.0042da70
inc ebx
cmp ebx, dword [edi + 0x20]
jl 0x415975
xor ebx, ebx
cmp dword [edi + 0x28], ebx
jle 0x4159a4
mov eax, dword [edi + 0x1c]
mov eax, dword [eax + ebx*4]
push esi
mov ecx, edi
call fcn.0042da70
inc ebx
cmp ebx, dword [edi + 0x28]
jl 0x415990
mov eax, dword [esp + 0x10]
inc eax
mov dword [esp + 0x10], eax
cmp eax, dword [esi + 0x1c]
jl 0x415962
mov ecx, dword [0x4c17f4]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
inc dword [esi + 0x26c]
push 0
push 0
push 0
push 0x67
push esi
call fcn.0041b960
test eax, eax
je 0x415a89
push 0
push 0
push 0
push 0x67
push esi
call fcn.0041b960
test eax, eax
je 0x415a89
mov edx, dword [esi + 0x630]
mov eax, dword [esi + 4]
push 0
mov dword [edx + 4], eax
mov ecx, dword [esi]
push 0
push ecx
mov ecx, esi
call fcn.00422d00
test eax, eax
je 0x415a89
lea edx, [esp + 0xb]
push edx
push 0
push 0
lea eax, [esp + 0x1c]
push eax
push 0
push str.ErrorLevel
mov ecx, esi
call fcn.0041fbb0
test eax, eax
jne 0x415a4b
mov edx, dword [esp + 0x10]
xor ecx, ecx
cmp byte [esp + 0xb], cl
setne cl
push ecx
push edx
push eax
push str.ErrorLevel
mov ecx, esi
call fcn.0041ff20
mov dword [0x4c17f0], eax
test eax, eax
je 0x415a89
push 1
push 0
push 0xffffffffffffffff
push 0x49b8d0
mov ecx, eax
call fcn.0046dd60
lea eax, [esp + 0x10]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov ecx, dword [esp + 0x10]
push ecx
call fcn.00412010
add esp, 4
mov eax, 1
pop edi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
or eax, 0xffffffff
pop ebx
mov esp, ebp
pop ebp
ret