Function at 0x403040
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
mov eax, dword [0x44b024]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], str.getaddrinfo
mov dword [ebp - 0x22c], 0x4029f0
mov dword [ebp - 0x228], str.getnameinfo
mov dword [ebp - 0x224], 0x402d90
mov dword [ebp - 0x220], str.freeaddrinfo
mov dword [ebp - 0x21c], fcn.00402980
xor eax, eax
jne 0x403099
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
cmp dword [0x44b990], 0
je 0x4030ca
movzx ecx, word [ebp + 8]
mov eax, dword [ecx*8 + 0x44b004]
jmp 0x4032ec
push 0x104
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x4030e5
jmp 0x40320a
lea eax, [ebp - 0x218]
push eax
push 0x10c
lea ecx, [ebp - 0x110]
push ecx
call fcn.004148d0
add esp, 0xc
push str.ws2_32
push 0x10c
lea edx, [ebp - 0x110]
push edx
call fcn.00414d00
add esp, 0xc
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x234], eax
cmp dword [ebp - 0x234], 0
je 0x40316d
push str.getaddrinfo
mov ecx, dword [ebp - 0x234]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x23c], eax
cmp dword [ebp - 0x23c], 0
jne 0x40316d
mov edx, dword [ebp - 0x234]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x234], 0
cmp dword [ebp - 0x234], 0
je 0x40317b
jmp 0x40320a
lea eax, [ebp - 0x218]
push eax
push 0x10c
lea ecx, [ebp - 0x110]
push ecx
call fcn.004148d0
add esp, 0xc
push str.wship6
push 0x10c
lea edx, [ebp - 0x110]
push edx
call fcn.00414d00
add esp, 0xc
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x234], eax
cmp dword [ebp - 0x234], 0
je 0x403203
push str.getaddrinfo
mov ecx, dword [ebp - 0x234]
push ecx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov dword [ebp - 0x23c], eax
cmp dword [ebp - 0x23c], 0
jne 0x403203
mov edx, dword [ebp - 0x234]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x234], 0
jmp 0x40320a
cmp dword [ebp - 0x234], 0
je 0x4032d7
mov dword [ebp - 0x238], 0
jmp 0x403232
mov eax, dword [ebp - 0x238]
add eax, 1
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 3
jge 0x40328e
mov ecx, dword [ebp - 0x238]
mov edx, dword [ebp + ecx*8 - 0x230]
push edx
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x238]
mov dword [ebp + ecx*8 - 0x22c], eax
mov edx, dword [ebp - 0x238]
cmp dword [ebp + edx*8 - 0x22c], 0
jne 0x40328c
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x234], 0
jmp 0x40328e
jmp 0x403223
cmp dword [ebp - 0x234], 0
je 0x4032d7
mov dword [ebp - 0x238], 0
jmp 0x4032b2
mov ecx, dword [ebp - 0x238]
add ecx, 1
mov dword [ebp - 0x238], ecx
cmp dword [ebp - 0x238], 3
jge 0x4032d7
mov edx, dword [ebp - 0x238]
mov eax, dword [ebp - 0x238]
mov ecx, dword [ebp + eax*8 - 0x22c]
mov dword [edx*8 + 0x44b004], ecx
jmp 0x4032a3
mov dword [0x44b990], 1
movzx edx, word [ebp + 8]
mov eax, dword [edx*8 + 0x44b004]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004037f0
mov esp, ebp
pop ebp
ret 4