Function at 0x402060
Capabilities:
Get common file path

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x23c
mov eax, dword [0x44701c]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x234], 0
mov dword [ebp - 0x230], str.getaddrinfo
mov dword [ebp - 0x22c], 0x401a10
mov dword [ebp - 0x228], str.getnameinfo
mov dword [ebp - 0x224], 0x401db0
mov dword [ebp - 0x220], str.freeaddrinfo
mov dword [ebp - 0x21c], fcn.004019a0
xor eax, eax
jne 0x4020b9
mov dword [ebp - 0x23c], 0
mov dword [ebp - 0x238], 0
cmp dword [0x447960], 0
je 0x4020ea
movzx ecx, word [ebp + 8]
mov eax, dword [ecx*8 + 0x447004]
jmp 0x40230c
push 0x104
lea edx, [ebp - 0x218]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
jne 0x402105
jmp 0x40222a
lea eax, [ebp - 0x218]
push eax
push 0x10c
lea ecx, [ebp - 0x110]
push ecx
call fcn.00411af0
add esp, 0xc
push str.ws2_32
push 0x10c
lea edx, [ebp - 0x110]
push edx
call fcn.00411f20
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 0x40218d
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 0x40218d
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 0x40219b
jmp 0x40222a
lea eax, [ebp - 0x218]
push eax
push 0x10c
lea ecx, [ebp - 0x110]
push ecx
call fcn.00411af0
add esp, 0xc
push str.wship6
push 0x10c
lea edx, [ebp - 0x110]
push edx
call fcn.00411f20
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 0x402223
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 0x402223
mov edx, dword [ebp - 0x234]
push edx
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x234], 0
jmp 0x40222a
cmp dword [ebp - 0x234], 0
je 0x4022f7
mov dword [ebp - 0x238], 0
jmp 0x402252
mov eax, dword [ebp - 0x238]
add eax, 1
mov dword [ebp - 0x238], eax
cmp dword [ebp - 0x238], 3
jge 0x4022ae
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 0x4022ac
mov eax, dword [ebp - 0x234]
push eax
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov dword [ebp - 0x234], 0
jmp 0x4022ae
jmp 0x402243
cmp dword [ebp - 0x234], 0
je 0x4022f7
mov dword [ebp - 0x238], 0
jmp 0x4022d2
mov ecx, dword [ebp - 0x238]
add ecx, 1
mov dword [ebp - 0x238], ecx
cmp dword [ebp - 0x238], 3
jge 0x4022f7
mov edx, dword [ebp - 0x238]
mov eax, dword [ebp - 0x238]
mov ecx, dword [ebp + eax*8 - 0x22c]
mov dword [edx*8 + 0x447004], ecx
jmp 0x4022c3
mov dword [0x447960], 1
movzx edx, word [ebp + 8]
mov eax, dword [edx*8 + 0x447004]
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.004028c0
mov esp, ebp
pop ebp
ret 4