Function at 0x40d13e
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x154
cmp byte [0x462069], 0
push ebx
push esi
push edi
je 0x40d3db
xor edi, edi
cmp dword [0x4644e8], edi
jne 0x40d3db
mov eax, dword [0x464c84]
mov edx, dword [0x464c80]
xor ecx, ecx
cmp eax, edi
mov dword [ebp - 0x14], eax
jle 0x40d18a
mov esi, edx
mov ebx, dword [ebp + 0xc]
cmp dword [esi], ebx
je 0x40d18a
inc ecx
add esi, 0xc
cmp ecx, eax
jl 0x40d17b
cmp ecx, eax
je 0x40d3db
lea eax, [ecx + ecx*2]
lea ebx, [edx + eax*4]
mov eax, dword [0x4644d4]
cmp eax, dword [0x462078]
mov esi, dword [ebx + 4]
jl 0x40d1c2
cmp eax, 0x14
jg 0x40d3db
mov eax, dword [esi + 4]
mov al, byte [eax]
cmp al, 0xd5
je 0x40d1c2
cmp al, 0xd0
jne 0x40d3db
cmp byte [ebx + 8], 0
jne 0x40d3db
cmp dword [0x464264], edi
jg 0x40d3db
mov dword [ebp - 0xc], edi
cmp dword [esi + 0x28], edi
jle 0x40d1f9
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
call fcn.0041d00a
add esp, 0xc
test eax, eax
je 0x40d3db
mov ecx, dword [0x464c98]
push 0x80
call fcn.00401c8a
push eax
push 0x4642cc
call fcn.0043880f
push 0x140
lea eax, [ebp - 0x154]
push 0x464238
push eax
call fcn.00454280
add esp, 0x18
cmp dword [0x4644f4], edi
je 0x40d240
push 0x464ca0
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
mov byte [ebx + 8], 1
mov eax, dword [esi + 4]
movzx eax, byte [eax]
push eax
push 1
push edi
push edi
call fcn.0040bd3e
add esp, 0x10
push edi
mov ecx, 0x464e00
call fcn.00415d7f
push dword [ebp + 8]
call fcn.0043a8f2
cmp eax, edi
pop ecx
mov dword [0x464350], eax
je 0x40d2a9
push eax
call fcn.004318b5
mov edi, eax
test edi, edi
pop ecx
je 0x40d2a7
mov eax, dword [edi + 8]
push 1
push dword [ebp + 8]
mov dword [0x46427c], eax
mov eax, dword [edi + 8]
mov ecx, edi
mov dword [0x464284], eax
call fcn.00431856
cmp eax, dword [edi + 0xc]
jae 0x40d2a7
mov dword [0x464280], eax
xor edi, edi
mov eax, dword [ebp + 0x18]
cmp eax, edi
je 0x40d2ca
mov ecx, dword [eax + 0x14]
mov dword [0x464274], ecx
mov ecx, dword [eax + 0x18]
mov dword [0x464278], ecx
mov eax, dword [eax + 0x10]
mov dword [0x464270], eax
cmp dword [esi + 0xc], edi
jle 0x40d318
mov eax, dword [esi + 8]
push dword [ebp + 0x10]
mov ecx, dword [eax]
call fcn.00401891
cmp dword [esi + 0xc], 1
jle 0x40d318
mov eax, dword [esi + 8]
push dword [ebp + 0x14]
mov ecx, dword [eax + 0x10]
call fcn.00401891
cmp dword [esi + 0xc], 2
jle 0x40d318
mov eax, dword [esi + 8]
push dword [ebp + 0xc]
mov ecx, dword [eax + 0x20]
call fcn.0041d23d
cmp dword [esi + 0xc], 3
jle 0x40d318
mov eax, dword [esi + 8]
push dword [ebp + 8]
mov ecx, dword [eax + 0x30]
call fcn.0041d23d
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov edi, dword [0x46434c]
mov dword [0x4652cc], eax
mov dword [0x4652c8], eax
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x4575d8
mov dword [0x46434c], esi
mov ecx, dword [esi + 4]
inc dword [esi + 0x28]
push eax
push 2
call fcn.00405839
dec dword [esi + 0x28]
mov dword [ebp - 4], eax
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
mov dword [0x46434c], edi
call fcn.00401bb9
lea eax, [ebp - 0x154]
push 1
push eax
call fcn.0040bc5b
mov eax, dword [0x464c84]
add esp, 0x14
cmp eax, dword [ebp - 0x14]
jl 0x40d390
mov ecx, dword [ebx]
cmp ecx, dword [ebp + 0xc]
jne 0x40d390
mov byte [ebx + 8], 0
jmp 0x40d3b7
xor ecx, ecx
test eax, eax
jle 0x40d3b7
mov edx, dword [0x464c80]
mov esi, edx
mov edi, dword [esi]
cmp edi, dword [ebp + 0xc]
je 0x40d3af
inc ecx
add esi, 0xc
cmp ecx, eax
jl 0x40d39e
jmp 0x40d3b7
lea eax, [ecx + ecx*2]
mov byte [edx + eax*4 + 8], 0
mov eax, dword [ebp - 8]
cmp byte [eax], 0
je 0x40d3db
cmp dword [ebp - 4], 8
je 0x40d3db
cmp dword [ebp - 4], 0
je 0x40d3db
push eax
call fcn.00401a01
pop ecx
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], eax
mov al, 1
jmp 0x40d3dd
xor al, al
pop edi
pop esi
pop ebx
leave
ret