Function at 0x42dfd0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 8]
sub esp, 0x124
cmp byte [0x4fdafe], 0
push ebx
mov ebx, ecx
push esi
push edi
mov dword [ebx + 0xab4], eax
jne 0x42e22d
cmp byte [ebx + 0xaf8], 0
je 0x42e22d
mov eax, dword [ebp + 0xc]
mov ecx, dword [0x4f99cc]
push 0
push 1
mov dword [0x4fdda8], eax
call fcn.00401600
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 [0x4f99d0]
xor eax, eax
mov word [esp + 0x13a], ax
add esp, 0xc
mov eax, dword [0x4f70f4]
mov ecx, 0x42
add eax, 0x108
mov esi, 0x4f98b0
mov edi, eax
mov dword [0x4f70f4], eax
rep movsd dword es:[edi], dword [esi]
push 0
mov ecx, 0x4fbb78
mov dword [eax + 0x2c], 0
call fcn.0042d9b0
cmp dword [0x4f99e4], 0
xorps xmm0, xmm0
movlpd qword [0x4fc680], xmm0
je 0x42e09c
mov eax, dword [0x4f8b50]
mov ecx, 0x4cdc40
test eax, eax
je 0x42e095
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [0x4f8aec]
mov edi, dword [0x4f70ec]
mov dword [0x4f70ec], 0
mov byte [0x4fdafe], 1
cmp ecx, dword [0x4f8af0]
jne 0x42e0cc
call fcn.00406c30
mov ecx, dword [0x4f8aec]
cmp ecx, dword [0x4f8ae8]
jb 0x42e0e1
mov eax, dword [0x4fc1c4]
mov dword [ecx], eax
mov ecx, dword [0x4f8aec]
add ecx, 0xc
mov byte [0x4f8f18], 0
mov dword [0x4f8aec], 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 0x42e1a9
mov eax, dword [0x4f70f4]
mov ecx, dword [eax + 0xbc]
mov dword [eax + 0xbc], esi
mov dword [esp + 0xc], ecx
mov ecx, dword [0x4f8aec]
cmp ecx, dword [0x4f8af0]
jne 0x42e141
call fcn.00406c30
mov ecx, dword [0x4f8aec]
cmp ecx, dword [0x4f8ae8]
jb 0x42e156
mov eax, dword [0x4fc1c4]
mov dword [ecx], eax
mov ecx, dword [0x4f8aec]
add ecx, 0xc
mov dword [0x4f8aec], 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.00442f10
mov ecx, dword [0x4f70f4]
sub dword [0x4f8aec], 0xc
mov edx, dword [esp + 0xc]
mov dword [ecx + 0xbc], edx
test eax, eax
je 0x42e1a9
cmp byte [0x4f8f18], 0
jne 0x42e1a9
mov byte [0x4f8f18], 1
jmp 0x42e1fa
mov byte [0x4f8f18], 1
mov dword [esp + 0x18], 0
call fcn.004651c0
mov dword [esp + 0x10], eax
lea ecx, [ebx + 0xa74]
mov eax, dword [0x4fdda8]
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.0049f420
cmp eax, 3
jne 0x42e279
sub dword [0x4f8aec], 0xc
xor al, al
mov byte [0x4fdafe], al
mov eax, dword [ebp + 8]
cmp eax, 0xffffffff
jle 0x42e28a
lea ecx, [esp + 0x30]
call fcn.00404e00
mov dword [0x4f70ec], edi
mov eax, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp byte [0x4f8f18], 0
jne 0x42e269
cmp eax, 6
jne 0x42e269
mov eax, dword [0x4fb268]
mov ecx, dword [0x4fdda8]
pop edi
pop esi
cmp word [eax], 0
mov eax, 8
mov byte [0x4f8f18], 1
cmovne ecx, dword [ebp + 0xc]
mov dword [0x4fdda8], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8
push dword [ebp + 0xc]
mov byte [0x4f8f18], 0
push eax
call fcn.0042e2a0
sub dword [0x4f8aec], 0xc
mov eax, dword [ebp + 8]
mov byte [0x4fdafe], 0
push dword [ebp + 0xc]
mov ecx, ebx
push eax
call fcn.0042e2a0
int3