Function at 0x402090
Capabilities:
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x48f142
mov eax, dword fs:[0]
push eax
sub esp, 0x38
mov eax, dword [0x4be4b0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea eax, [ebp - 0x40]
mov dword [esi], 0
lea edi, [esi + 0x28]
mov dword [esi + 4], 0
mov dword [esi + 8], 0
mov dword [esi + 0xc], 0
mov dword [esi + 0x10], 0
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [esi + 0x1c], 0xffffffff
mov byte [esi + 0x20], 1
mov dword [esi + 0x24], 0
mov dword [edi], 0
push eax
mov dword [0x4c26e0], esi
call fcn.00484d90
push eax
mov dword [ebp - 4], 0
call fcn.00412990
mov edx, dword [ebp - 0x2c]
add esp, 8
mov dword [ebp - 4], 0xffffffff
cmp edx, 8
jb 0x402169
mov ecx, dword [ebp - 0x40]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x40215f
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x40215f
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0048c837
add esp, 8
lea eax, [ebp - 0x28]
push 1
push eax
call fcn.00484ef0
add esp, 8
cmp dword [eax + 0x14], 8
jb 0x40217f
mov eax, dword [eax]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov edx, dword [ebp - 0x14]
cmp edx, 8
jb 0x4021c2
mov ecx, dword [ebp - 0x28]
lea edx, [edx*2 + 2]
mov eax, ecx
cmp edx, 0x1000
jb 0x4021b8
mov ecx, dword [ecx - 4]
add edx, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x4021b8
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push edx
push ecx
call fcn.0048c837
add esp, 8
xor eax, eax
mov dword [ebp - 0x18], 0
push 0x64
mov dword [ebp - 0x14], 7
mov word [ebp - 0x28], ax
call fcn.0048c807
add esp, 4
mov dword [ebp - 0x44], eax
mov dword [ebp - 4], 1
test eax, eax
je 0x4021f7
mov ecx, eax
call fcn.004056a0
jmp 0x4021f9
xor eax, eax
push 0x4c
mov dword [ebp - 4], 0xffffffff
mov dword [esi], eax
call fcn.0048c807
add esp, 4
mov dword [ebp - 0x44], eax
mov dword [ebp - 4], 2
test eax, eax
je 0x402223
mov ecx, eax
call fcn.00408500
jmp 0x402225
xor eax, eax
push 1
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 0xc], eax
call fcn.0048c807
add esp, 4
mov dword [ebp - 0x44], eax
mov dword [ebp - 4], 3
test eax, eax
je 0x402250
mov ecx, eax
call fcn.00408550
jmp 0x402252
xor eax, eax
push 0x38
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 0x10], eax
call fcn.0048c807
add esp, 4
mov dword [ebp - 0x44], eax
mov dword [ebp - 4], 4
test eax, eax
je 0x40227d
mov ecx, eax
call int.0042d940
jmp 0x40227f
xor eax, eax
push 8
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 8], eax
call fcn.0048c807
add esp, 4
mov dword [ebp - 0x44], eax
mov dword [ebp - 4], 5
test eax, eax
je 0x4022aa
mov ecx, eax
call fcn.0042c210
jmp 0x4022ac
xor eax, eax
push 4
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 0x14], eax
call fcn.0048c807
add esp, 4
mov dword [ebp - 0x44], eax
mov dword [ebp - 4], 6
test eax, eax
je 0x4022d7
mov ecx, eax
call fcn.0043f600
jmp 0x4022d9
xor eax, eax
push 0
mov dword [ebp - 4], 0xffffffff
mov dword [esi + 0x18], eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0x49b6b0
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
je 0x4022fe
push edi
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0048c845
mov esp, ebp
pop ebp
ret