Function at 0x40d028
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x154
cmp byte [0x461069], 0
push ebx
push esi
push edi
je 0x40d2c5
xor edi, edi
cmp dword [0x4634c8], edi
jne 0x40d2c5
mov eax, dword [0x463c64]
mov edx, dword [0x463c60]
xor ecx, ecx
cmp eax, edi
mov dword [ebp - 0x14], eax
jle 0x40d074
mov esi, edx
mov ebx, dword [ebp + 0xc]
cmp dword [esi], ebx
je 0x40d074
inc ecx
add esi, 0xc
cmp ecx, eax
jl 0x40d065
cmp ecx, eax
je 0x40d2c5
lea eax, [ecx + ecx*2]
lea ebx, [edx + eax*4]
mov eax, dword [0x4634b4]
cmp eax, dword [0x461078]
mov esi, dword [ebx + 4]
jl 0x40d0ac
cmp eax, 0x14
jg 0x40d2c5
mov eax, dword [esi + 4]
mov al, byte [eax]
cmp al, 0xd5
je 0x40d0ac
cmp al, 0xd0
jne 0x40d2c5
cmp byte [ebx + 8], 0
jne 0x40d2c5
cmp dword [0x463244], edi
jg 0x40d2c5
mov dword [ebp - 0xc], edi
cmp dword [esi + 0x28], edi
jle 0x40d0e3
lea eax, [ebp - 0x10]
push eax
lea eax, [ebp - 0xc]
push eax
push esi
call fcn.0041d56a
add esp, 0xc
test eax, eax
je 0x40d2c5
mov ecx, dword [0x463c78]
push 0x80
call fcn.00401c84
push eax
push 0x4632ac
call fcn.00438c34
push 0x140
lea eax, [ebp - 0x154]
push 0x463218
push eax
call fcn.00453500
add esp, 0x18
cmp dword [0x4634d4], edi
je 0x40d12a
push 0x463c80
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.0040bc93
add esp, 0x10
push edi
mov ecx, 0x463de0
call fcn.00415c5a
push dword [ebp + 8]
call fcn.0043ad0d
cmp eax, edi
pop ecx
mov dword [0x463330], eax
je 0x40d193
push eax
call fcn.00431def
mov edi, eax
test edi, edi
pop ecx
je 0x40d191
mov eax, dword [edi + 8]
push 1
push dword [ebp + 8]
mov dword [0x46325c], eax
mov eax, dword [edi + 8]
mov ecx, edi
mov dword [0x463264], eax
call fcn.00431d90
cmp eax, dword [edi + 0xc]
jae 0x40d191
mov dword [0x463260], eax
xor edi, edi
mov eax, dword [ebp + 0x18]
cmp eax, edi
je 0x40d1b4
mov ecx, dword [eax + 0x14]
mov dword [0x463254], ecx
mov ecx, dword [eax + 0x18]
mov dword [0x463258], ecx
mov eax, dword [eax + 0x10]
mov dword [0x463250], eax
cmp dword [esi + 0xc], edi
jle 0x40d202
mov eax, dword [esi + 8]
push dword [ebp + 0x10]
mov ecx, dword [eax]
call fcn.0040188b
cmp dword [esi + 0xc], 1
jle 0x40d202
mov eax, dword [esi + 8]
push dword [ebp + 0x14]
mov ecx, dword [eax + 0x10]
call fcn.0040188b
cmp dword [esi + 0xc], 2
jle 0x40d202
mov eax, dword [esi + 8]
push dword [ebp + 0xc]
mov ecx, dword [eax + 0x20]
call fcn.0041d776
cmp dword [esi + 0xc], 3
jle 0x40d202
mov eax, dword [esi + 8]
push dword [ebp + 8]
mov ecx, dword [eax + 0x30]
call fcn.0041d776
call dword [sym.imp.KERNEL32.DLL_GetTickCount]
mov edi, dword [0x46332c]
mov dword [0x4642ac], eax
mov dword [0x4642a8], eax
push 0
lea eax, [ebp - 8]
mov dword [ebp - 8], 0x4565d8
mov dword [0x46332c], esi
mov ecx, dword [esi + 4]
inc dword [esi + 0x28]
push eax
push 2
call fcn.004057b1
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 [0x46332c], edi
call fcn.00401bb3
lea eax, [ebp - 0x154]
push 1
push eax
call fcn.0040bbb0
mov eax, dword [0x463c64]
add esp, 0x14
cmp eax, dword [ebp - 0x14]
jl 0x40d27a
mov ecx, dword [ebx]
cmp ecx, dword [ebp + 0xc]
jne 0x40d27a
mov byte [ebx + 8], 0
jmp 0x40d2a1
xor ecx, ecx
test eax, eax
jle 0x40d2a1
mov edx, dword [0x463c60]
mov esi, edx
mov edi, dword [esi]
cmp edi, dword [ebp + 0xc]
je 0x40d299
inc ecx
add esi, 0xc
cmp ecx, eax
jl 0x40d288
jmp 0x40d2a1
lea eax, [ecx + ecx*2]
mov byte [edx + eax*4 + 8], 0
mov eax, dword [ebp - 8]
cmp byte [eax], 0
je 0x40d2c5
cmp dword [ebp - 4], 8
je 0x40d2c5
cmp dword [ebp - 4], 0
je 0x40d2c5
push eax
call fcn.004019fb
pop ecx
mov ecx, dword [ebp + 0x1c]
mov dword [ecx], eax
mov al, 1
jmp 0x40d2c7
xor al, al
pop edi
pop esi
pop ebx
leave
ret