Function at 0x42f2d0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 8]
sub esp, 0x124
cmp byte [0x4ffafe], 0
push ebx
mov ebx, ecx
push esi
push edi
mov dword [ebx + 0xab4], eax
jne 0x42f52d
cmp byte [ebx + 0xaf8], 0
je 0x42f52d
mov eax, dword [ebp + 0xc]
mov ecx, dword [0x4fb9cc]
push 0
push 1
mov dword [0x4ffda8], eax
call fcn.004016b0
push 0x7f
push eax
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
inc dword [0x4fb9d0]
xor eax, eax
mov word [esp + 0x13a], ax
add esp, 0xc
mov eax, dword [0x4f90f4]
mov ecx, 0x42
add eax, 0x108
mov esi, 0x4fb8b0
mov edi, eax
mov dword [0x4f90f4], eax
rep movsd dword es:[edi], dword [esi]
push 0
mov ecx, 0x4fdb78
mov dword [eax + 0x2c], 0
call fcn.0042ecb0
cmp dword [0x4fb9e4], 0
xorps xmm0, xmm0
movlpd qword [0x4fe680], xmm0
je 0x42f39c
mov eax, dword [0x4fab50]
mov ecx, 0x4cfc40
test eax, eax
je 0x42f395
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [0x4faaec]
mov edi, dword [0x4f90ec]
mov dword [0x4f90ec], 0
mov byte [0x4ffafe], 1
cmp ecx, dword [0x4faaf0]
jne 0x42f3cc
call fcn.00406f70
mov ecx, dword [0x4faaec]
cmp ecx, dword [0x4faae8]
jb 0x42f3e1
mov eax, dword [0x4fe1c4]
mov dword [ecx], eax
mov ecx, dword [0x4faaec]
add ecx, 0xc
mov byte [0x4faf18], 0
mov dword [0x4faaec], ecx
mov dword [ecx], 0
mov dword [ecx + 4], str.OnExit
mov dword [ecx + 8], 0
mov esi, dword [ebx + 0xaa8]
test esi, esi
je 0x42f4a9
mov eax, dword [0x4f90f4]
mov ecx, dword [eax + 0xbc]
mov dword [eax + 0xbc], esi
mov dword [esp + 0xc], ecx
mov ecx, dword [0x4faaec]
cmp ecx, dword [0x4faaf0]
jne 0x42f441
call fcn.00406f70
mov ecx, dword [0x4faaec]
cmp ecx, dword [0x4faae8]
jb 0x42f456
mov eax, dword [0x4fe1c4]
mov dword [ecx], eax
mov ecx, dword [0x4faaec]
add ecx, 0xc
mov dword [0x4faaec], ecx
mov eax, dword [esi + 8]
push 0
push 0
mov dword [ecx], eax
mov dword [ecx + 4], esi
mov dword [ecx + 8], 1
mov ecx, dword [esi + 8]
push 1
call fcn.004445a0
mov ecx, dword [0x4f90f4]
sub dword [0x4faaec], 0xc
mov edx, dword [esp + 0xc]
mov dword [ecx + 0xbc], edx
test eax, eax
je 0x42f4a9
cmp byte [0x4faf18], 0
jne 0x42f4a9
mov byte [0x4faf18], 1
jmp 0x42f4fa
mov byte [0x4faf18], 1
mov dword [esp + 0x18], 0
call fcn.00465b80
mov dword [esp + 0x10], eax
lea ecx, [ebx + 0xa74]
mov eax, dword [0x4ffda8]
cdq
mov dword [esp + 0x20], eax
xor eax, eax
cmp dword [ebx + 0xaa8], eax
mov dword [esp + 0x28], 1
sete al
mov dword [esp + 0x24], edx
push eax
push 2
lea eax, [esp + 0x18]
push eax
call fcn.004a0ea0
cmp eax, 3
jne 0x42f579
sub dword [0x4faaec], 0xc
xor al, al
mov byte [0x4ffafe], al
mov eax, dword [ebp + 8]
cmp eax, 0xffffffff
jle 0x42f58a
lea ecx, [esp + 0x30]
call fcn.00405100
mov dword [0x4f90ec], edi
mov eax, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp byte [0x4faf18], 0
jne 0x42f569
cmp eax, 6
jne 0x42f569
mov eax, dword [0x4fd268]
mov ecx, dword [0x4ffda8]
pop edi
pop esi
cmp word [eax], 0
mov eax, 8
mov byte [0x4faf18], 1
cmovne ecx, dword [ebp + 0xc]
mov dword [0x4ffda8], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8
push dword [ebp + 0xc]
mov byte [0x4faf18], 0
push eax
call fcn.0042f5a0
sub dword [0x4faaec], 0xc
mov eax, dword [ebp + 8]
mov byte [0x4ffafe], 0
push dword [ebp + 0xc]
mov ecx, ebx
push eax
call fcn.0042f5a0
int3