Function at 0x42f030
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 8]
sub esp, 0x12c
cmp byte [0x4ffb0e], 0
push ebx
mov ebx, ecx
push esi
push edi
mov dword [ebx + 0xab4], eax
jne 0x42f2b3
cmp byte [ebx + 0xaf8], 0
je 0x42f2b3
mov eax, dword [ebp + 0xc]
mov ecx, dword [0x4fb9e4]
push 0
push 1
mov dword [0x4ffdb8], eax
call fcn.00401690
push 0x7f
push eax
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_wcsncpy]
inc dword [0x4fb9e8]
xor eax, eax
mov word [esp + 0x142], ax
add esp, 0xc
mov eax, dword [0x4f90f4]
mov ecx, 0x42
add eax, 0x108
mov esi, 0x4fb8c8
mov edi, eax
mov dword [0x4f90f4], eax
rep movsd dword es:[edi], dword [esi]
push 0
mov ecx, 0x4fdb90
mov dword [eax + 0x2c], 0
call fcn.0042ebc0
cmp dword [0x4fb9fc], 0
xorps xmm0, xmm0
movlpd qword [0x4fe698], xmm0
je 0x42f0fc
mov eax, dword [0x4fab58]
mov ecx, 0x4cfc30
test eax, eax
je 0x42f0f5
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [0x4faaf4]
mov edi, dword [0x4f90ec]
mov dword [0x4f90ec], 0
mov byte [0x4ffb0e], 1
cmp ecx, dword [0x4faaf8]
jne 0x42f12c
call fcn.00406ef0
mov ecx, dword [0x4faaf4]
cmp ecx, dword [0x4faaf0]
jb 0x42f141
mov eax, dword [0x4fe1dc]
mov dword [ecx], eax
mov ecx, dword [0x4faaf4]
add ecx, 0xc
mov byte [0x4faf24], 0
mov dword [0x4faaf4], ecx
mov al, 1
mov dword [esp + 0x10], eax
mov dword [ecx], 0
mov dword [ecx + 4], str.OnExit
mov dword [ecx + 8], 0
mov esi, dword [ebx + 0xaa8]
test esi, esi
je 0x42f213
mov eax, dword [0x4f90f4]
mov ecx, dword [eax + 0xbc]
mov dword [eax + 0xbc], esi
mov dword [esp + 0x14], ecx
mov ecx, dword [0x4faaf4]
cmp ecx, dword [0x4faaf8]
jne 0x42f1a7
call fcn.00406ef0
mov ecx, dword [0x4faaf4]
cmp ecx, dword [0x4faaf0]
jb 0x42f1bc
mov eax, dword [0x4fe1dc]
mov dword [ecx], eax
mov ecx, dword [0x4faaf4]
add ecx, 0xc
mov dword [0x4faaf4], 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.00444270
mov ecx, dword [0x4f90f4]
sub dword [0x4faaf4], 0xc
test eax, eax
mov edx, dword [esp + 0x14]
mov eax, dword [esp + 0x10]
mov dword [ecx + 0xbc], edx
je 0x42f213
xor ecx, ecx
movzx eax, al
cmp byte [0x4faf24], cl
cmove eax, ecx
mov dword [esp + 0x10], eax
mov byte [0x4faf24], 1
test al, al
je 0x42f27c
mov dword [esp + 0x20], 0
call fcn.004657f0
mov dword [esp + 0x18], eax
lea ecx, [ebx + 0xa74]
mov eax, dword [0x4ffdb8]
cdq
mov dword [esp + 0x28], eax
xor eax, eax
cmp dword [ebx + 0xaa8], eax
mov dword [esp + 0x30], 1
sete al
mov dword [esp + 0x2c], edx
push eax
push 2
lea eax, [esp + 0x20]
push eax
call fcn.004a09e0
cmp eax, 3
jne 0x42f278
sub dword [0x4faaf4], 0xc
mov byte [0x4ffb0e], 0
jmp 0x42f28e
mov eax, dword [esp + 0x10]
sub dword [0x4faaf4], 0xc
mov byte [0x4ffb0e], 0
test al, al
jne 0x42f2f9
mov eax, dword [ebp + 8]
cmp eax, 0xffffffff
jle 0x42f2fc
lea ecx, [esp + 0x38]
call fcn.00405090
mov dword [0x4f90ec], edi
mov eax, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp byte [0x4faf24], 0
jne 0x42f2e9
cmp eax, 6
jne 0x42f2e9
mov eax, dword [0x4fd280]
cmp word [eax], 0
je 0x42f2d4
mov eax, dword [ebp + 0xc]
mov dword [0x4ffdb8], eax
pop edi
pop esi
mov byte [0x4faf24], 1
mov eax, 8
pop ebx
mov esp, ebp
pop ebp
ret 8
push dword [ebp + 0xc]
mov byte [0x4faf24], 0
push eax
call fcn.0042f310
mov eax, dword [ebp + 8]
push dword [ebp + 0xc]
mov ecx, ebx
push eax
call fcn.0042f310
int3