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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3ac
mov eax, dword [0x40f014]
push ebx
push esi
push edi
mov dword [ebp - 4], eax
push 0x40
xor eax, eax
pop ecx
mov byte [ebp - 0x20c], 0
lea edi, [ebp - 0x20b]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
xor eax, eax
pop ecx
mov byte [ebp - 0x310], 0
lea edi, [ebp - 0x30f]
rep stosd dword es:[edi], eax
mov ebx, dword [ebp + 8]
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x40
pop ecx
xor eax, eax
mov byte [ebp - 0x108], 0
lea edi, [ebp - 0x107]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
lea eax, [ebp - 0x310]
push eax
mov esi, 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
test eax, eax
jne 0x403b2b
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x401454
push 0x401440
push 0xeb
push 0x401240
jmp 0x403d36
push esi
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x403b56
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x401428
push 0x401440
push pe_nt_image_headers32
jmp 0x403b21
lea eax, [ebp - 0x108]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x403b80
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x401410
push 0x401440
push 0xf5
jmp 0x403b21
and dword [ebx], 0
and dword [ebx + 4], 0
lea eax, [ebp - 0x3a4]
push eax
mov dword [ebp - 0x3a4], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
test eax, eax
mov edi, 0x401440
mov esi, 0x401240
jne 0x403bc4
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x401400
push edi
push 0x103
jmp 0x403c59
cmp dword [ebp - 0x394], 2
jne 0x403ce9
cmp dword [ebp - 0x3a0], 4
jb 0x403d11
jne 0x403ce1
push 0x4013f4
lea eax, [ebp - 0x108]
push eax
lea eax, [ebp - 0x20c]
push eax
mov dword [ebx], 0x40002
call fcn.00405f8e
test eax, eax
jne 0x403c2f
push 0x4013f4
lea eax, [ebp - 0x108]
push eax
push 0x4013d0
push 0
push 0
push edi
push 0x11d
push esi
call fcn.004062d4
add esp, 0x20
jmp 0x403d11
lea eax, [ebp - 0x20c]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
test eax, eax
mov dword [ebp - 0x3a8], eax
jne 0x403c67
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x4013c0
push edi
push 0x128
push esi
call fcn.004062d4
add esp, 0x18
jmp 0x403d11
push 0x4013ac
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
test eax, eax
mov dword [ebp - 0x3ac], eax
jne 0x403ca4
lea eax, [ebp - 0x20c]
push eax
push 0x401380
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40136c
push edi
push 0x12d
push esi
call fcn.004062d4
add esp, 0x1c
push dword [ebp - 0x3a8]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
test eax, eax
jne 0x403cd0
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x40121c
push edi
push 0x130
push esi
call fcn.004062d4
add esp, 0x18
cmp dword [ebp - 0x3ac], 0
je 0x403d11
mov dword [ebx], 0x40003
jmp 0x403d11
mov dword [ebx], 0x40006
jmp 0x403d0d
mov eax, dword [ebp - 0x398]
and eax, 0xffff
cmp eax, 0x549
jbe 0x403d0a
mov dword [ebx], 0x40005
mov dword [ebx + 4], 0x10000
jmp 0x403d11
and dword [ebx], 0
and dword [ebx + 4], 0
lea eax, [ebp - 0x310]
push eax
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
test eax, eax
jne 0x403d42
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push 0x401410
push edi
push 0x162
push esi
call fcn.004062d4
add esp, 0x18
xor eax, eax
jmp 0x403d45
xor eax, eax
inc eax
mov ecx, dword [ebp - 4]
pop edi
pop esi
pop ebx
call fcn.004065c9
leave
ret 4