Function at 0x415850
Capabilities:
Set current directory

Disassembly:
mov eax, dword [edi + 0x5bc]
sub esp, 0x10
push ebx
push ebp
push esi
xor esi, esi
mov byte [edi + 0x168], 1
mov word [edi + 0x5d4], 0
cmp eax, esi
je 0x415adb
cmp byte [eax], 0
je 0x415adb
cmp dword [0x4a4bb8], esi
jne 0x415895
call fcn.00469cb0
mov dword [0x4a4bb8], eax
cmp eax, esi
je 0x4158da
mov ecx, dword [0x4a4bbc]
cmp dword [ecx + 8], 0x10
jae 0x4158b3
call fcn.00469cb0
mov ecx, dword [0x4a4bbc]
mov dword [ecx + 0xc], eax
cmp eax, esi
je 0x4158da
mov eax, dword [ecx + 4]
add dword [ecx + 8], 0xfffffff0
lea edx, [eax + 0x10]
mov dword [0x4a4bc0], eax
mov dword [ecx + 4], edx
cmp eax, esi
je 0x4158da
mov dword [eax], 0x49281e
mov dword [eax + 4], esi
mov dword [eax + 8], esi
mov dword [eax + 0xc], esi
jmp 0x4158dc
xor eax, eax
mov dword [edi + 0x368], eax
cmp eax, esi
je 0x415adb
mov eax, dword [edi + 0x5bc]
push eax
push edi
call fcn.00415c30
cmp eax, 1
jne 0x415adb
push esi
push esi
push esi
push 0x67
push edi
call fcn.0041b7a0
test eax, eax
je 0x415adb
xor ebx, ebx
mov dword [esp + 0x10], esi
xor ebp, ebp
jmp 0x415920
cmp ebp, dword [0x4a2d70]
jge 0x41595d
jmp 0x415930
mov ecx, dword [0x4a2d6c]
mov esi, dword [ecx + ebp*4]
push 0
push 0
push esi
mov ecx, edi
call fcn.004213d0
test eax, eax
je 0x415adb
inc ebp
mov byte [esi], 0x11
cmp ebp, dword [0x4a2d70]
jl 0x415930
mov esi, dword [esp + 0x10]
cmp esi, dword [edi + 0xc]
je 0x41598b
test esi, esi
je 0x41596b
mov eax, dword [esi + 0x14]
jmp 0x41596e
mov eax, dword [edi + 8]
push 0
push 0
push eax
mov ecx, edi
call fcn.004213d0
test eax, eax
je 0x415adb
mov edx, dword [edi + 0xc]
mov dword [esp + 0x10], edx
mov esi, edx
cmp ebx, dword [edi + 4]
je 0x4159b7
test ebx, ebx
je 0x415999
mov eax, dword [ebx + 0x14]
jmp 0x41599b
mov eax, dword [edi]
push 0
push 0
push eax
mov ecx, edi
call fcn.004213d0
test eax, eax
je 0x415adb
mov ebx, dword [edi + 4]
jmp 0x415920
cmp dword [edi + 8], 0
je 0x4159d2
mov ecx, dword [edi]
mov eax, dword [edi + 0xc]
mov dword [eax + 0x14], ecx
mov edx, dword [edi]
mov eax, dword [edi + 0xc]
mov dword [edx + 0x10], eax
mov ecx, dword [edi + 8]
mov dword [edi], ecx
xor ebx, ebx
cmp dword [edi + 0x1c], ebx
jle 0x415a0c
lea esp, [esp]
mov edx, dword [edi + 0x18]
mov ebp, dword [edx + ebx*4]
cmp byte [ebp + 0x3d], 0
jne 0x415a06
mov eax, dword [ebp + 0x1c]
push ebp
lea esi, [ebp + 0x28]
push edi
call fcn.0042d650
mov eax, dword [ebp + 0x20]
push ebp
lea esi, [ebp + 0x30]
push edi
call fcn.0042d650
inc ebx
cmp ebx, dword [edi + 0x1c]
jl 0x4159e0
mov eax, dword [0x4a34fc]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
inc dword [edi + 0x164]
push 0
push 0
push 0
push 0x67
push edi
call fcn.0041b7a0
test eax, eax
je 0x415adb
push 0
push 0
push 0
push 0x67
push edi
call fcn.0041b7a0
test eax, eax
je 0x415adb
mov ecx, dword [edi + 0x368]
mov edx, dword [edi + 4]
push 0
mov dword [ecx + 4], edx
mov eax, dword [edi]
push 0
push eax
mov ecx, edi
call fcn.00421610
test eax, eax
je 0x415adb
lea ecx, [esp + 0xf]
push ecx
push 3
lea edx, [esp + 0x18]
push edx
push 0
push str.ErrorLevel
mov ecx, edi
call fcn.0041f920
test eax, eax
jne 0x415aa1
cmp byte [esp + 0xf], al
mov ecx, dword [esp + 0x10]
setne al
mov edx, str.ErrorLevel
inc eax
push eax
push ecx
push edi
xor ecx, ecx
call fcn.0041fbb0
mov dword [0x4a33f4], eax
test eax, eax
je 0x415adb
push 1
push 0
push 0xffffffffffffffff
push 0x492868
push eax
call fcn.0046f1f0
lea edx, [esp + 0x10]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov eax, dword [esp + 0x10]
call fcn.00411ee0
mov eax, 1
pop esi
pop ebp
pop ebx
add esp, 0x10
ret
pop esi
pop ebp
or eax, 0xffffffff
pop ebx
add esp, 0x10
ret