Function at 0x4022a0
Capabilities:
Set current directory

Disassembly:
sub esp, 0x110
mov eax, dword [0x40a86c]
push esi
push eax
call fcn.004012f0
mov ecx, dword [0x40a86c]
mov esi, dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
add esp, 4
push ecx
call esi
push 0x40a0b8
call esi
mov edx, dword [0x40a86c]
push edx
call fcn.004012a0
mov eax, dword [0x40a890]
add esp, 4
mov dword [esp + 4], eax
mov eax, dword [0x40a894]
test eax, eax
mov byte [esp + 0x10], 0
mov dword [esp + 8], 0
jbe 0x4024c8
mov edx, dword [0x40a870]
push ebp
push edi
mov ecx, dword [esp + 0xc]
mov ebp, dword [ecx]
test byte [ebp + 8], 2
jne 0x4024a4
mov edi, dword [ebp]
cmp byte [edi], 0x2e
jne 0x402372
mov edi, dword [0x40a86c]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp]
cmp byte [eax + 1], 0x5c
jne 0x40238f
lea edi, [eax + 2]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [0x40a870]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
jmp 0x40238a
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [ebp + 4]
mov edx, dword [0x40a870]
mov eax, edx
cmp byte [ecx], 0
je 0x4023f2
push edx
call fcn.004012a0
mov edi, dword [ebp + 4]
or ecx, 0xffffffff
xor eax, eax
push 0x5c
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, dword [0x40a870]
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [0x40a870]
push eax
call fcn.00403480
add esp, 0xc
test eax, eax
je 0x40249e
mov byte [eax], 0
mov edx, dword [0x40a870]
test eax, eax
je 0x4024a4
push edx
call fcn.004012f0
mov edx, dword [0x40a870]
lea ecx, [esp + 0x1c]
push ecx
push edx
call fcn.004037a0
add esp, 0xc
test eax, eax
je 0x40249e
mov eax, dword [0x40a870]
xor ebp, ebp
push eax
call fcn.00401d30
add esp, 4
test eax, eax
jne 0x40249e
mov ecx, dword [0x40a870]
push ecx
call fcn.00403602
add esp, 4
test eax, eax
jne 0x40249e
mov edx, dword [0x40a870]
test ebp, ebp
jne 0x402479
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
lea esi, [esp + 0x18]
sub edi, ecx
mov eax, ecx
mov dword [esp + 0x14], esi
mov esi, edi
mov edi, dword [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
mov ebp, 1
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push 0x5c
push edx
call fcn.00403480
add esp, 8
test eax, eax
je 0x40249e
mov byte [eax], 0
mov ecx, dword [0x40a870]
push ecx
call fcn.00401d30
add esp, 4
test eax, eax
je 0x402430
mov edx, dword [0x40a870]
mov eax, dword [esp + 0x10]
mov esi, dword [esp + 0xc]
mov ecx, dword [0x40a894]
inc eax
add esi, 4
cmp eax, ecx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], esi
jb 0x402305
pop edi
pop ebp
mov edx, dword [0x40a86c]
push edx
call fcn.004012a0
add esp, 4
pop esi
add esp, 0x110
ret