Function at 0x40be20
Capabilities:
Set current directory

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x462422
push eax
mov dword fs:[0], esp
sub esp, 0x134
push ebp
mov ebp, dword [esp + 0x148]
push esi
mov esi, ecx
mov eax, dword [esi + 0x204]
cmp eax, 6
push edi
jne 0x40bf0b
sub esp, 0xc
mov eax, esp
mov dword [esp + 0x18], esp
push eax
mov ecx, ebp
call fcn.00425cb0
call fcn.0040d7b0
add esp, 0xc
cmp eax, 7
jne 0x40bf0b
mov ecx, dword [esi + 0x1f4]
mov eax, dword [ecx + 0xa14]
push eax
lea edx, [esp + 0x18]
push 0x12c
push edx
call fcn.0044715f
lea eax, [esp + 0x20]
add esp, 0xc
lea edx, [eax + 1]
mov edi, edi
mov cl, byte [eax]
add eax, 1
test cl, cl
jne 0x40bea0
sub eax, edx
cmp eax, 3
jge 0x40bebf
mov ecx, 0x493500
call fcn.00419de0
jmp case.default.0x40c04a
cmp eax, 4
jle 0x40bed2
cmp byte [esp + eax + 0x13], 0x5c
lea eax, [esp + eax + 0x13]
jne 0x40bed2
mov byte [eax], 0
sub esp, 0xc
lea eax, [esp + 0x20]
mov ecx, esp
mov dword [esp + 0x18], esp
push eax
call fcn.00422620
call fcn.00403bc0
add esp, 0xc
lea ecx, [esp + 0x14]
push ecx
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
je 0x40beb0
lea edx, [esp + 0x14]
push edx
mov ecx, 0x4934f4
call fcn.00422790
push 1
push 0x3e9
mov ecx, esi
mov byte [esi + 0x180], 1
call fcn.0042af37
mov ecx, eax
call fcn.0042b134
mov eax, dword [esi + 0x204]
add eax, 0xffffffff
cmp eax, 6
ja case.default.0x40bf39
jmp dword [eax*4 + 0x40c2bc]
mov ecx, dword [esi + 0x1e4]
call fcn.00429d50
jmp case.default.0x40bf39
mov ecx, dword [esi + 0x1e8]
call fcn.0041d290
jmp case.default.0x40bf39
mov ecx, dword [esi + 0x1ec]
call fcn.00420dc0
jmp case.default.0x40bf39
sub esp, 0xc
mov eax, esp
mov dword [esp + 0x18], esp
push 4
push eax
call fcn.0040d2b0
add esp, 8
call fcn.0040aad0
mov ecx, esp
mov dword [esp + 0x18], esp
push ecx
mov ecx, ebp
mov edi, eax
call fcn.00425cb0
call fcn.0040aad0
add esp, 0xc
cmp eax, edi
jle 0x40bfb8
mov ecx, dword [esi + 0x1f0]
call fcn.0041e630
test al, al
je 0x40beb0
mov ecx, dword [esi + 0x1f0]
call fcn.0041dd40
mov ecx, dword [esi + 0x1f0]
call fcn.0041dad0
jmp case.default.0x40bf39
mov ecx, dword [esi + 0x1f4]
call fcn.004011a0
jmp case.default.0x40bf39
mov edx, dword [esi + 0x1f8]
add edx, 0x188
push edx
mov ecx, 0x48812c
call fcn.00422540
mov ecx, dword [esi + 0x1f8]
call fcn.004200e0
jmp case.default.0x40bf39
mov ecx, dword [esi + 0x1fc]
call fcn.00419050
sub esp, 0xc
mov eax, esp
mov dword [esp + 0x18], esp
push eax
mov ecx, ebp
call fcn.00425cb0
call fcn.0040d7b0
mov ecx, esp
mov dword [esp + 0x18], esp
push ecx
mov ecx, ebp
mov dword [esi + 0x204], eax
call fcn.00425cb0
call fcn.0040d7b0
sub eax, 1
add esp, 0xc
cmp eax, 6
ja case.default.0x40c04a
jmp dword [eax*4 + 0x40c2d8]
mov ecx, dword [esi + 0x1e4]
mov byte [esi + 0x180], 0
call fcn.00429d40
jmp case.default.0x40c04a
mov ecx, dword [esi + 0x1e8]
sub esp, 0xc
mov edx, esp
mov dword [esp + 0x18], esp
push edx
call fcn.0041d220
mov ecx, dword [esi + 0x1e8]
sub esp, 0xc
mov eax, esp
mov dword [esp + 0x28], esp
push eax
mov dword [esp + 0x164], 0
call fcn.0041d1f0
mov ecx, esi
mov dword [esp + 0x160], 0xffffffff
call fcn.0040bda0
cmp byte [0x488025], 0
jne 0x40c0cd
push 0
push 0x3e9
mov ecx, esi
call fcn.0042af37
mov ecx, eax
call fcn.0042b134
mov ecx, dword [esi + 0x1e8]
call fcn.0041d250
jmp case.default.0x40c04a
sub esp, 0xc
mov ecx, esp
mov dword [esp + 0x1c], esp
push ecx
mov ecx, dword [esi + 0x1ec]
call fcn.00420d80
mov ecx, dword [esi + 0x1ec]
sub esp, 0xc
mov edx, esp
mov dword [esp + 0x24], esp
push edx
mov dword [esp + 0x164], 1
call fcn.00420d50
mov ecx, esi
mov dword [esp + 0x160], 0xffffffff
call fcn.0040bda0
mov ecx, dword [esi + 0x1ec]
call fcn.00420db0
jmp case.default.0x40c04a
mov ecx, dword [esi + 0x1f0]
sub esp, 0xc
mov eax, esp
mov dword [esp + 0x1c], esp
push eax
call fcn.0041dd00
sub esp, 0xc
mov ecx, esp
mov dword [esp + 0x24], esp
push ecx
mov ecx, dword [esi + 0x1f0]
mov dword [esp + 0x164], 2
call fcn.0041dcd0
mov ecx, esi
mov dword [esp + 0x160], 0xffffffff
call fcn.0040bda0
mov ecx, dword [esi + 0x1f0]
call fcn.0041dd30
jmp case.default.0x40c04a
mov ecx, dword [esi + 0x1f4]
sub esp, 0xc
mov edx, esp
mov dword [esp + 0x1c], esp
push edx
call fcn.00401150
mov ecx, dword [esi + 0x1f4]
sub esp, 0xc
mov eax, esp
mov dword [esp + 0x24], esp
push eax
mov dword [esp + 0x164], 3
call fcn.00401120
mov ecx, esi
mov dword [esp + 0x160], 0xffffffff
call fcn.0040bda0
mov ecx, dword [esi + 0x1f4]
call fcn.00401190
jmp case.default.0x40c04a
sub esp, 0xc
mov ecx, esp
mov dword [esp + 0x1c], esp
push ecx
mov ecx, dword [esi + 0x1f8]
call fcn.00420090
mov ecx, dword [esi + 0x1f8]
sub esp, 0xc
mov edx, esp
mov dword [esp + 0x24], esp
push edx
mov dword [esp + 0x164], 4
call fcn.00420060
mov ecx, esi
mov dword [esp + 0x160], 0xffffffff
call fcn.0040bda0
mov ecx, dword [esi + 0x1f8]
call fcn.004200d0
jmp case.default.0x40c04a
mov ecx, dword [esi + 0x1fc]
sub esp, 0xc
mov eax, esp
mov dword [esp + 0x1c], esp
push eax
call fcn.00418fa0
sub esp, 0xc
mov ecx, esp
mov dword [esp + 0x24], esp
push ecx
mov ecx, dword [esi + 0x1fc]
mov dword [esp + 0x164], 5
call fcn.00418f70
mov ecx, esi
mov dword [esp + 0x160], 0xffffffff
call fcn.0040bda0
push 0
lea ecx, [esi + 0x11c]
call fcn.0042b134
push 0
lea ecx, [esi + 0xc8]
call fcn.0042b134
mov ecx, dword [esi + 0x1fc]
call fcn.00418fe0
mov ecx, dword [esp + 0x140]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebp
add esp, 0x140
ret 4