Function at 0x42dff0
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 8]
sub esp, 0x124
cmp byte [0x522bee], 0
push ebx
mov ebx, ecx
push esi
push edi
mov dword [ebx + 0xab4], eax
jne 0x42e24c
cmp byte [ebx + 0xaf8], 0
je 0x42e24c
mov eax, dword [ebp + 0xc]
mov ecx, dword [0x51eabc]
push 0
push 1
mov dword [0x522e98], eax
call fcn.00401630
push 0x7f
push eax
lea eax, [esp + 0x38]
push eax
call fcn.004d95fc
inc dword [0x51eac0]
xor eax, eax
mov word [esp + 0x13a], ax
add esp, 0xc
mov eax, dword [0x51b98c]
mov ecx, 0x42
add eax, 0x108
mov esi, 0x51e9a0
mov edi, eax
mov dword [0x51b98c], eax
rep movsd dword es:[edi], dword [esi]
push 0
mov ecx, 0x520c68
mov dword [eax + 0x2c], 0
call fcn.0042d9d0
cmp dword [0x51ead4], 0
xorps xmm0, xmm0
movlpd qword [0x521770], xmm0
je 0x42e0bb
mov eax, dword [0x51d3e8]
mov ecx, 0x4f03e8
test eax, eax
je 0x42e0b4
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [0x51d384]
mov edi, dword [0x51b984]
mov dword [0x51b984], 0
mov byte [0x522bee], 1
cmp ecx, dword [0x51d388]
jne 0x42e0eb
call fcn.00406d30
mov ecx, dword [0x51d384]
cmp ecx, dword [0x51d380]
jb 0x42e100
mov eax, dword [0x5212b4]
mov dword [ecx], eax
mov ecx, dword [0x51d384]
add ecx, 0xc
mov byte [0x51d7b0], 0
mov dword [0x51d384], 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 0x42e1c8
mov eax, dword [0x51b98c]
mov ecx, dword [eax + 0xbc]
mov dword [eax + 0xbc], esi
mov dword [esp + 0xc], ecx
mov ecx, dword [0x51d384]
cmp ecx, dword [0x51d388]
jne 0x42e160
call fcn.00406d30
mov ecx, dword [0x51d384]
cmp ecx, dword [0x51d380]
jb 0x42e175
mov eax, dword [0x5212b4]
mov dword [ecx], eax
mov ecx, dword [0x51d384]
add ecx, 0xc
mov dword [0x51d384], 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.00442fb0
mov ecx, dword [0x51b98c]
sub dword [0x51d384], 0xc
mov edx, dword [esp + 0xc]
mov dword [ecx + 0xbc], edx
test eax, eax
je 0x42e1c8
cmp byte [0x51d7b0], 0
jne 0x42e1c8
mov byte [0x51d7b0], 1
jmp 0x42e219
mov byte [0x51d7b0], 1
mov dword [esp + 0x18], 0
call fcn.004651d0
mov dword [esp + 0x10], eax
lea ecx, [ebx + 0xa74]
mov eax, dword [0x522e98]
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.0049f450
cmp eax, 3
jne 0x42e298
sub dword [0x51d384], 0xc
xor al, al
mov byte [0x522bee], al
mov eax, dword [ebp + 8]
cmp eax, 0xffffffff
jle 0x42e2a9
lea ecx, [esp + 0x30]
call fcn.00404f20
mov dword [0x51b984], edi
mov eax, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp byte [0x51d7b0], 0
jne 0x42e288
cmp eax, 6
jne 0x42e288
mov eax, dword [0x520358]
mov ecx, dword [0x522e98]
pop edi
pop esi
cmp word [eax], 0
mov eax, 8
mov byte [0x51d7b0], 1
cmovne ecx, dword [ebp + 0xc]
mov dword [0x522e98], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8
push dword [ebp + 0xc]
mov byte [0x51d7b0], 0
push eax
call fcn.0042e2c0
sub dword [0x51d384], 0xc
mov eax, dword [ebp + 8]
mov byte [0x522bee], 0
push dword [ebp + 0xc]
mov ecx, ebx
push eax
call fcn.0042e2c0
int3