Function at 0x42d940
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, dword [ebp + 8]
sub esp, 0xa4
cmp byte [0x4fd531], 0
push ebx
mov ebx, ecx
push esi
push edi
mov dword [ebx + 0x5ec], eax
jne 0x42db9b
cmp byte [ebx + 0x630], 0
je 0x42db9b
mov eax, dword [ebp + 0xc]
mov ecx, dword [0x4d995c]
push 0
push 1
mov dword [0x4fd6d4], eax
call fcn.00401640
push 0x7f
push eax
lea eax, [esp + 0x38]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncpy]
mov eax, dword [0x4d70f4]
add esp, 0xc
inc dword [0x4d9960]
add eax, 0xe8
mov byte [esp + 0xaf], 0
mov edi, eax
mov ecx, 0x3a
mov dword [0x4d70f4], eax
mov esi, 0x4d9860
rep movsd dword es:[edi], dword [esi]
push 0
mov ecx, 0x4dba98
mov dword [eax + 0x2c], 0
call fcn.0042d340
cmp dword [0x4d9974], 0
xorps xmm0, xmm0
movlpd qword [0x4dc0d8], xmm0
je 0x42da0a
mov eax, dword [0x4d8ae0]
mov ecx, 0x4c3c29
test eax, eax
je 0x42da03
mov eax, dword [eax]
test eax, eax
cmovne ecx, eax
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov ecx, dword [0x4d8a7c]
mov edi, dword [0x4d70ec]
mov dword [0x4d70ec], 0
mov byte [0x4fd531], 1
cmp ecx, dword [0x4d8a80]
jne 0x42da3a
call fcn.00406580
mov ecx, dword [0x4d8a7c]
cmp ecx, dword [0x4d8a78]
jb 0x42da4f
mov eax, dword [0x4dbe24]
mov dword [ecx], eax
mov ecx, dword [0x4d8a7c]
add ecx, 0xc
mov byte [0x4d8e9a], 0
mov dword [0x4d8a7c], ecx
mov dword [ecx], 0
mov dword [ecx + 4], str.OnExit
mov dword [ecx + 8], 0
mov esi, dword [ebx + 0x5e0]
test esi, esi
je 0x42db17
mov eax, dword [0x4d70f4]
mov ecx, dword [eax + 0x9c]
mov dword [eax + 0x9c], esi
mov dword [esp + 0xc], ecx
mov ecx, dword [0x4d8a7c]
cmp ecx, dword [0x4d8a80]
jne 0x42daaf
call fcn.00406580
mov ecx, dword [0x4d8a7c]
cmp ecx, dword [0x4d8a78]
jb 0x42dac4
mov eax, dword [0x4dbe24]
mov dword [ecx], eax
mov ecx, dword [0x4d8a7c]
add ecx, 0xc
mov dword [0x4d8a7c], 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.00442d30
mov ecx, dword [0x4d70f4]
sub dword [0x4d8a7c], 0xc
mov edx, dword [esp + 0xc]
mov dword [ecx + 0x9c], edx
test eax, eax
je 0x42db17
cmp byte [0x4d8e9a], 0
jne 0x42db17
mov byte [0x4d8e9a], 1
jmp 0x42db68
mov byte [0x4d8e9a], 1
mov dword [esp + 0x18], 0
call fcn.00465680
mov dword [esp + 0x10], eax
lea ecx, [ebx + 0x5ac]
mov eax, dword [0x4fd6d4]
cdq
mov dword [esp + 0x20], eax
xor eax, eax
cmp dword [ebx + 0x5e0], 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.0049db00
cmp eax, 3
jne 0x42dbe6
sub dword [0x4d8a7c], 0xc
xor al, al
mov byte [0x4fd531], al
mov eax, dword [ebp + 8]
cmp eax, 0xffffffff
jle 0x42dbf7
lea ecx, [esp + 0x30]
call fcn.00404550
mov dword [0x4d70ec], edi
mov eax, 8
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
cmp byte [0x4d8e9a], 0
jne 0x42dbd6
cmp eax, 6
jne 0x42dbd6
mov eax, dword [0x4db170]
mov ecx, dword [0x4fd6d4]
pop edi
pop esi
cmp byte [eax], 0
mov eax, 8
mov byte [0x4d8e9a], 1
cmovne ecx, dword [ebp + 0xc]
mov dword [0x4fd6d4], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8
push dword [ebp + 0xc]
mov byte [0x4d8e9a], 0
push eax
call fcn.0042dc10
sub dword [0x4d8a7c], 0xc
mov eax, dword [ebp + 8]
mov byte [0x4fd531], 0
push dword [ebp + 0xc]
mov ecx, ebx
push eax
call fcn.0042dc10
int3