Function at 0x403820
Capabilities:
Set current directory

Disassembly:
mov eax, dword [0x429764]
sub esp, 0xc
test eax, eax
push ebx
jne 0x403afb
mov eax, dword [0x429348]
mov ebx, dword [0x429344]
test eax, eax
mov dword [esp + 8], 0
mov dword [esp + 4], ebx
jbe 0x403afb
push ebp
push esi
push edi
jmp 0x403859
mov ebx, dword [esp + 0x10]
mov ecx, dword [ebx + 0x1a]
mov eax, dword [esp + 0x24]
mov esi, ecx
shr esi, 0x1b
and esi, 1
mov dword [esp + 0x18], esi
je 0x403873
cmp eax, 1
jmp 0x403876
cmp eax, 2
je 0x403ad5
mov eax, dword [esp + 0x20]
mov edx, ecx
and edx, 0x7000000
cmp edx, eax
jne 0x403ad5
cmp eax, 0x3000000
ja 0x4038cc
je 0x4038d7
cmp eax, 0x1000000
je 0x4038a7
cmp eax, 0x2000000
jne 0x4038ec
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4038c2
mov eax, dword [0x429768]
test eax, eax
je 0x4038ec
test ecx, ecx
js 0x403ad5
jmp 0x4038ec
test ecx, ecx
jns 0x403ad5
jmp 0x4038ec
cmp eax, 0x4000000
jne 0x4038ec
test esi, esi
jne 0x4038ec
mov eax, dword [esp + 0x28]
test eax, eax
je 0x4038ec
mov eax, dword [0x429768]
test eax, eax
jne 0x403ad5
test ecx, 0x40000000
je 0x403998
xor eax, eax
test esi, esi
setne al
add eax, 0x21
push eax
push 7
call fcn.00403700
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x403998
cmp byte [ebp], 0
je 0x403998
push 0
push ebx
call fcn.00403b00
mov ebx, eax
push 0x5c
push ebx
call fcn.00418f90
add esp, 0x10
test eax, eax
je 0x403939
lea ebx, [eax + 1]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov edi, ebp
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
lea eax, [edx + ecx + 1]
push eax
call fcn.004190e0
mov esi, eax
add esp, 4
test esi, esi
je 0x403990
push ebx
push ebp
push esi
call dword [sym.imp.USER32.dll_wsprintfA]
push 0x24
push esi
call fcn.004036c0
xor ecx, ecx
cmp eax, 6
sete cl
push esi
mov edi, ecx
call fcn.00419243
add esp, 0x18
test edi, edi
je 0x403ad1
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x10]
push ebx
call fcn.0040d7c0
add esp, 4
test esi, esi
je 0x403a0e
mov edx, dword [0x4292bc]
push 0
push edx
call fcn.004010a0
add esp, 8
cmp eax, 0xffffffff
je 0x403ad5
push eax
call fcn.00401320
mov eax, dword [0x4292bc]
push 0x2e
push eax
call fcn.00418f90
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x4039e1
mov esi, dword [0x4240a4]
mov ecx, dword [0x4292b8]
mov edx, dword [0x4292bc]
push 0x104
push ecx
push edx
call dword [sym.imp.KERNEL32.DLL_GetShortPathNameA]
mov eax, dword [0x4292b8]
push esi
push eax
call fcn.00402630
add esp, 8
jmp 0x403ad5
mov ecx, dword [0x42975c]
push ecx
call fcn.004020b0
mov edx, dword [0x42975c]
add esp, 4
push edx
call dword [sym.imp.KERNEL32.DLL_SetCurrentDirectoryA]
mov eax, dword [0x42975c]
push eax
call fcn.00402070
push 8
push ebx
call fcn.00403b00
mov esi, eax
add esp, 0xc
mov edi, esi
cmp byte [esi], 0
je 0x403a6c
push 0xffdc
push esi
push 0
call fcn.0040c440
lea ebp, [eax + 1]
push ebp
call fcn.004190e0
mov edi, eax
push ebp
push esi
push edi
call fcn.0040c440
add esp, 0x1c
mov ecx, dword [ebx + 0x1a]
mov edx, dword [0x4292bc]
shr ecx, 0x1c
and ecx, 1
push ecx
push edi
push edx
call fcn.00402b20
add esp, 0xc
cmp edi, esi
je 0x403a93
push edi
call fcn.00419243
add esp, 4
mov eax, dword [ebx + 0x1a]
and eax, 0x30000000
cmp eax, 0x30000000
jne 0x403ad5
mov ecx, dword [0x4292bc]
push ecx
call fcn.00419510
add esp, 4
test eax, eax
je 0x403ad5
push 0x7d0
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov edx, dword [0x4292bc]
push edx
call fcn.00419510
add esp, 4
jmp 0x403ad5
mov ebx, dword [esp + 0x10]
mov edx, dword [esp + 0x14]
push ebx
inc edx
mov dword [esp + 0x18], edx
call fcn.00403810
mov dword [esp + 0x14], eax
mov eax, dword [0x429348]
add esp, 4
cmp edx, eax
jb 0x403855
pop edi
pop esi
pop ebp
pop ebx
add esp, 0xc
ret