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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3ac
mov eax, dword [0x10013010]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov ebx, 0x103
push ebx
xor edi, edi
lea eax, [ebp - 0x20b]
push edi
push eax
mov dword [ebp - 0x3a8], esi
mov byte [ebp - 0x20c], 0
call fcn.100072c0
push ebx
lea eax, [ebp - 0x30f]
push edi
push eax
mov byte [ebp - 0x310], 0
call fcn.100072c0
push ebx
lea eax, [ebp - 0x107]
push edi
push eax
mov byte [ebp - 0x108], 0
call fcn.100072c0
add esp, 0x24
lea eax, [ebp - 0x310]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x10004118
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10001460
push 0x1000144c
push 0xeb
push 0x10001270
call fcn.10006b9b
add esp, 0x18
xor eax, eax
jmp 0x10004328
push 0x104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x10004147
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10001434
push 0x1000144c
push 0xf0
jmp 0x10004104
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x10004171
push edi
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1000141c
push 0x1000144c
push 0xf5
jmp 0x10004104
lea eax, [ebp - 0x3a4]
push eax
mov dword [esi], edi
mov dword [esi + 4], edi
mov dword [ebp - 0x3a4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
mov edi, 0x1000144c
mov esi, 0x10001270
test eax, eax
jne 0x100041b8
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1000140c
push edi
push ebx
push esi
call fcn.10006b9b
add esp, 0x18
jmp 0x100042fb
cmp dword [ebp - 0x394], 2
jne 0x100042d4
cmp dword [ebp - 0x3a0], 4
jb 0x100042fb
mov eax, dword [ebp - 0x3a8]
jne 0x100042cc
mov dword [eax], 0x40002
mov ebx, 0x10001400
push ebx
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push eax
call fcn.10006718
test eax, eax
jne 0x10004226
push ebx
lea eax, [ebp - 0x108]
push eax
push 0x100013dc
push 0
push 0
push edi
push 0x11d
push esi
call fcn.10006b9b
add esp, 0x20
jmp 0x100042fb
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, eax
test ebx, ebx
jne 0x10004251
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x100013cc
push edi
push 0x128
jmp 0x100041aa
push 0x100013b8
push ebx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x3ac], eax
test eax, eax
jne 0x1000428e
lea eax, [ebp - 0x20c]
push eax
push 0x1000138c
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x10001378
push edi
push 0x12d
push esi
call fcn.10006b9b
add esp, 0x1c
push ebx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
jne 0x100042b5
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1000123c
push edi
push 0x130
push esi
call fcn.10006b9b
add esp, 0x18
cmp dword [ebp - 0x3ac], 0
je 0x100042fb
mov eax, dword [ebp - 0x3a8]
mov dword [eax], 0x40003
jmp 0x100042fb
mov dword [eax], 0x40006
jmp 0x100042f7
cmp word [ebp - 0x398], 0x549
mov eax, dword [ebp - 0x3a8]
jbe 0x100042f4
mov dword [eax], 0x40005
mov dword [eax + 4], 0x10000
jmp 0x100042fb
and dword [eax], 0
and dword [eax + 4], 0
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x10004325
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x1000141c
push edi
push 0x162
push esi
jmp 0x10004109
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.100072a1
leave
ret 4