Function at 0x401000
Capabilities:
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x52612f
mov eax, dword fs:[0]
push eax
push ecx
sub esp, 0xfc
push ebx
push esi
push edi
mov eax, dword [0x587730]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x10], esp
mov byte [ebp - 0x11], 0
mov byte [ebp - 0x19], 0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0xc]
push eax
mov ecx, dword [ebp + 8]
call fcn.00406540
mov ecx, dword [ebp + 8]
call fcn.00406580
push eax
push 3
call fcn.004017a0
add esp, 8
mov dword [ebp - 0x98], eax
cmp dword [ebp - 0x98], 0
jne 0x401092
mov ecx, dword [ebp + 8]
call fcn.00406580
push eax
push 0
call fcn.004017a0
add esp, 8
mov dword [ebp - 0x9c], eax
cmp dword [ebp - 0x9c], 0
je 0x401092
mov byte [ebp - 0x11], 1
mov dword [ebp - 0x18], 0xffffffff
cmp dword [ebp + 0x10], 0
je 0x4010af
cmp dword [ebp + 0x10], 4
je 0x4010af
cmp dword [ebp + 0x10], 5
jne 0x40138c
mov ecx, dword [ebp + 8]
call fcn.00406580
push eax
push 3
call fcn.004017a0
add esp, 8
mov dword [ebp - 0xa0], eax
cmp dword [ebp - 0xa0], 0
je 0x4011ca
push 0x5c
mov ecx, dword [ebp + 8]
call fcn.00405970
mov dword [ebp - 0x24], 0x104
lea ecx, [ebp - 0x28]
call fcn.00406440
mov byte [ebp - 4], 1
mov ecx, dword [ebp - 0x24]
push ecx
lea ecx, [ebp - 0x28]
call fcn.004065b0
mov dword [ebp - 0xa4], eax
mov edx, dword [ebp - 0xa4]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0xffffffffffffffff
lea ecx, [ebp - 0x28]
call fcn.00406600
mov ecx, dword [ebp + 8]
call fcn.00406580
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
mov ecx, dword [ebp - 0x24]
push ecx
mov ecx, dword [ebp + 8]
call fcn.004065b0
mov dword [ebp - 0xa8], eax
mov edx, dword [ebp - 0xa8]
push edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0xffffffffffffffff
mov ecx, dword [ebp + 8]
call fcn.00406600
lea ecx, [ebp - 0x28]
call fcn.00406580
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 1
lea ecx, [ebp - 0x6c]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00405ab0
mov dword [ebp - 0xac], eax
push 0x536ec8
mov edx, dword [ebp - 0xac]
push edx
call fcn.00405dd0
add esp, 8
mov byte [ebp - 0x65], al
lea ecx, [ebp - 0x6c]
call fcn.00406500
movzx eax, byte [ebp - 0x65]
test eax, eax
je 0x4011b2
push 0x536ec8
mov ecx, dword [ebp + 8]
call fcn.00405600
mov dword [ebp - 0x18], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x28]
call fcn.00406500
jmp 0x401283
movzx ecx, byte [ebp - 0x11]
test ecx, ecx
je 0x401276
push 0x5c
mov ecx, dword [ebp + 8]
call fcn.004058d0
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jle 0x401267
mov edx, dword [ebp - 0x20]
add edx, 1
push edx
lea eax, [ebp - 0x70]
push eax
mov ecx, dword [ebp + 8]
call fcn.00405b40
mov dword [ebp - 0xb0], eax
mov ecx, dword [ebp - 0xb0]
mov dword [ebp - 0xb4], ecx
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0xb4]
push edx
mov ecx, dword [ebp + 8]
call fcn.00406520
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x70]
call fcn.00406500
mov ecx, dword [ebp + 8]
call fcn.00406580
push eax
push 3
call fcn.004017a0
add esp, 8
mov dword [ebp - 0xb8], eax
cmp dword [ebp - 0xb8], 0
je 0x401258
mov dword [ebp - 0x18], 0
jmp 0x401265
push 0x536e60
mov ecx, dword [ebp + 8]
call fcn.00406540
jmp 0x401274
push 0x536e60
mov ecx, dword [ebp + 8]
call fcn.00406540
jmp 0x401283
push 0x536e60
mov ecx, dword [ebp + 8]
call fcn.00406540
cmp dword [ebp - 0x18], 0
jne 0x40130e
cmp dword [ebp + 0x10], 4
jne 0x40130e
push 0
push 0x536ec0
mov ecx, dword [ebp + 8]
call fcn.00405850
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jle 0x4012f8
mov eax, dword [ebp - 0x20]
add eax, 1
push eax
lea ecx, [ebp - 0x74]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00405b40
mov dword [ebp - 0xbc], eax
mov edx, dword [ebp - 0xbc]
mov dword [ebp - 0xc0], edx
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0xc0]
push eax
mov ecx, dword [ebp + 8]
call fcn.00406520
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x74]
call fcn.00406500
mov dword [ebp - 0x18], 0
jmp 0x40130c
push 0x536e60
mov ecx, dword [ebp + 8]
call fcn.00406540
mov dword [ebp - 0x18], 0xfffffffe
jmp 0x401387
cmp dword [ebp - 0x18], 0
jne 0x401387
cmp dword [ebp + 0x10], 5
jne 0x401387
push 0
push 0x536ec0
mov ecx, dword [ebp + 8]
call fcn.00405850
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jle 0x401380
mov esi, dword [ebp - 0x20]
add esi, 1
mov ecx, dword [ebp + 8]
call fcn.004065e0
sub eax, esi
push eax
lea ecx, [ebp - 0x78]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00405ab0
mov dword [ebp - 0xc4], eax
mov edx, dword [ebp - 0xc4]
mov dword [ebp - 0xc8], edx
mov byte [ebp - 4], 4
mov eax, dword [ebp - 0xc8]
push eax
mov ecx, dword [ebp + 8]
call fcn.00406520
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x78]
call fcn.00406500
mov dword [ebp - 0x18], 0
jmp 0x40174c
cmp dword [ebp + 0x10], 1
jne 0x40141f
movzx ecx, byte [ebp - 0x11]
test ecx, ecx
je 0x40140d
push 0
mov ecx, dword [ebp + 8]
call fcn.00406580
push eax
lea ecx, [ebp - 0x3c]
call fcn.00417e75
mov dword [ebp - 0xcc], eax
mov byte [ebp - 4], 5
lea edx, [ebp - 0x7c]
push edx
lea ecx, [ebp - 0x3c]
call fcn.004187fa
mov dword [ebp - 0xd0], eax
mov eax, dword [ebp - 0xd0]
mov dword [ebp - 0xd4], eax
mov byte [ebp - 4], 6
mov ecx, dword [ebp - 0xd4]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00406520
mov byte [ebp - 4], 5
lea ecx, [ebp - 0x7c]
call fcn.00406500
mov dword [ebp - 0x18], 0
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x3c]
call fcn.004178ca
jmp 0x40141a
push 0x536e60
mov ecx, dword [ebp + 8]
call fcn.00406540
jmp 0x40174c
cmp dword [ebp + 0x10], 2
jne 0x40151f
movzx edx, byte [ebp - 0x11]
test edx, edx
je 0x40150d
push 0
mov ecx, dword [ebp + 8]
call fcn.00406580
push eax
lea ecx, [ebp - 0x50]
call fcn.00417e75
mov dword [ebp - 0xd8], eax
mov byte [ebp - 4], 7
lea eax, [ebp - 0x80]
push eax
lea ecx, [ebp - 0x50]
call fcn.004187fa
mov dword [ebp - 0xdc], eax
mov ecx, dword [ebp - 0xdc]
mov dword [ebp - 0xe0], ecx
mov byte [ebp - 4], 8
mov edx, dword [ebp - 0xe0]
push edx
mov ecx, dword [ebp + 8]
call fcn.00406520
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x80]
call fcn.00406500
push 0x2e
mov ecx, dword [ebp + 8]
call fcn.004058d0
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jle 0x4014f2
mov eax, dword [ebp - 0x20]
push eax
lea ecx, [ebp - 0x84]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00405b40
mov dword [ebp - 0xe4], eax
mov edx, dword [ebp - 0xe4]
mov dword [ebp - 0xe8], edx
mov byte [ebp - 4], 9
mov eax, dword [ebp - 0xe8]
push eax
mov ecx, dword [ebp + 8]
call fcn.00406520
mov byte [ebp - 4], 7
lea ecx, [ebp - 0x84]
call fcn.00406500
mov dword [ebp - 0x18], 0
jmp 0x4014ff
push 0x536e60
mov ecx, dword [ebp + 8]
call fcn.00406540
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x50]
call fcn.004178ca
jmp 0x40151a
push 0x536e60
mov ecx, dword [ebp + 8]
call fcn.00406540
jmp 0x40174c
cmp dword [ebp + 0x10], 3
jne 0x401632
movzx ecx, byte [ebp - 0x11]
test ecx, ecx
je 0x401620
push 0
mov ecx, dword [ebp + 8]
call fcn.00406580
push eax
lea ecx, [ebp - 0x64]
call fcn.00417e75
mov dword [ebp - 0xec], eax
mov byte [ebp - 4], 0xa
lea edx, [ebp - 0x88]
push edx
lea ecx, [ebp - 0x64]
call fcn.004187fa
mov dword [ebp - 0xf0], eax
mov eax, dword [ebp - 0xf0]
mov dword [ebp - 0xf4], eax
mov byte [ebp - 4], 0xb
mov ecx, dword [ebp - 0xf4]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00406520
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x88]
call fcn.00406500
push 0x2e
mov ecx, dword [ebp + 8]
call fcn.004058d0
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jle 0x401605
mov esi, dword [ebp - 0x20]
add esi, 1
mov ecx, dword [ebp + 8]
call fcn.004065e0
sub eax, esi
push eax
lea edx, [ebp - 0x8c]
push edx
mov ecx, dword [ebp + 8]
call fcn.00405ab0
mov dword [ebp - 0xf8], eax
mov eax, dword [ebp - 0xf8]
mov dword [ebp - 0xfc], eax
mov byte [ebp - 4], 0xc
mov ecx, dword [ebp - 0xfc]
push ecx
mov ecx, dword [ebp + 8]
call fcn.00406520
mov byte [ebp - 4], 0xa
lea ecx, [ebp - 0x8c]
call fcn.00406500
mov dword [ebp - 0x18], 0
jmp 0x401612
push 0x536e60
mov ecx, dword [ebp + 8]
call fcn.00406540
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x64]
call fcn.004178ca
jmp 0x40162d
push 0x536e60
mov ecx, dword [ebp + 8]
call fcn.00406540
jmp 0x40174c
cmp dword [ebp + 0x10], 6
jne 0x4016b3
push 0x5c
mov ecx, dword [ebp + 8]
call fcn.00405970
push 0x5c
mov ecx, dword [ebp + 8]
call fcn.004058d0
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jle 0x4016a1
mov edx, dword [ebp - 0x20]
add edx, 1
push edx
lea eax, [ebp - 0x90]
push eax
mov ecx, dword [ebp + 8]
call fcn.00405b40
mov dword [ebp - 0x100], eax
mov ecx, dword [ebp - 0x100]
mov dword [ebp - 0x104], ecx
mov byte [ebp - 4], 0xd
mov edx, dword [ebp - 0x104]
push edx
mov ecx, dword [ebp + 8]
call fcn.00406520
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x90]
call fcn.00406500
jmp 0x4016ae
push 0x536e60
mov ecx, dword [ebp + 8]
call fcn.00406540
jmp 0x40174c
cmp dword [ebp + 0x10], 7
jne 0x40173f
push 0x5c
mov ecx, dword [ebp + 8]
call fcn.00405970
push 0x5c
mov ecx, dword [ebp + 8]
call fcn.004058d0
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0xffffffff
jle 0x401730
mov esi, dword [ebp - 0x20]
add esi, 1
mov ecx, dword [ebp + 8]
call fcn.004065e0
sub eax, esi
push eax
lea eax, [ebp - 0x94]
push eax
mov ecx, dword [ebp + 8]
call fcn.00405ab0
mov dword [ebp - 0x108], eax
mov ecx, dword [ebp - 0x108]
mov dword [ebp - 0x10c], ecx
mov byte [ebp - 4], 0xe
mov edx, dword [ebp - 0x10c]
push edx
mov ecx, dword [ebp + 8]
call fcn.00406520
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x94]
call fcn.00406500
jmp 0x40173d
push 0x536e60
mov ecx, dword [ebp + 8]
call fcn.00406540
jmp 0x40174c
push 0x536e60
mov ecx, dword [ebp + 8]
call fcn.00406540
push 0xffffffffffffffff
mov ecx, dword [ebp + 8]
call fcn.00406600
jmp 0x401779
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret