Function at 0x4020e0
Capabilities:
Check os version
Get common file path
Get hostname

Disassembly:
sub esp, 0x3c8
push ebp
push esi
lea eax, [esp + 0x28]
push edi
push eax
mov dword [esp + 0x30], 0x94
call dword [sym.imp.KERNEL32.dll_GetVersionExA]
cmp dword [esp + 0x30], 6
jne 0x4021a9
cmp dword [esp + 0x34], 1
jne 0x4021a9
mov eax, dword [0x41ba68]
test eax, eax
jne 0x402126
push eax
call fcn.00402e00
mov dword [0x41ba68], eax
mov esi, dword [esp + 0x3e4]
mov ecx, dword [esp + 0x3e0]
mov edx, dword [esp + 0x3dc]
mov ebp, dword [esp + 0x3d8]
push esi
push ecx
push edx
push ebp
call eax
mov edi, eax
push edi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
test edi, edi
jne 0x402435
push ebp
call fcn.00402060
add esp, 4
test eax, eax
je 0x40219d
mov ecx, dword [esi]
mov ecx, dword [ecx + 0x18]
mov word [ecx], 2
mov dword [ecx + 4], eax
mov edx, dword [esi]
mov edi, dword [edx + 0x1c]
test edi, edi
je 0x40219d
mov eax, dword [0x41ba64]
test eax, eax
jne 0x402191
push 2
call fcn.00402e00
mov dword [0x41ba64], eax
push edi
call eax
mov eax, dword [esi]
mov dword [eax + 0x1c], 0
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x3c8
ret
lea ecx, [esp + 0x10]
lea edx, [esp + 0x2d4]
push ecx
push edx
mov byte [esp + 0x2dc], 0
mov dword [esp + 0x18], pe_nt_image_headers32
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
test eax, eax
je 0x402435
mov eax, dword [0x41ba68]
test eax, eax
jne 0x4021e8
push eax
call fcn.00402e00
mov dword [0x41ba68], eax
mov edi, dword [esp + 0x3e4]
lea ecx, [esp + 0x2d4]
push edi
push 0
push 0
push ecx
call eax
mov esi, eax
push esi
call dword [sym.imp.WS2_32.dll_WSASetLastError]
test esi, esi
jne 0x402435
mov edx, dword [esp + 0x3d8]
push edx
call fcn.00402060
add esp, 4
test eax, eax
je 0x402435
mov ecx, dword [edi]
mov ecx, dword [ecx + 0x18]
mov word [ecx], 2
mov dword [ecx + 4], eax
mov edx, dword [edi]
mov ecx, dword [edx + 0x1c]
test ecx, ecx
mov dword [esp + 0xc], ecx
je 0x40241d
mov eax, dword [0x41ba64]
test eax, eax
jne 0x402411
mov eax, dword [0x41ba60]
mov dword [esp + 0x14], str.getaddrinfo
test eax, eax
mov dword [esp + 0x18], 0x4024a0
mov dword [esp + 0x1c], str.getnameinfo
mov dword [esp + 0x20], 0x402bc0
mov dword [esp + 0x24], str.freeaddrinfo
mov dword [esp + 0x28], 0x402450
je 0x402295
mov eax, dword [0x4138bc]
jmp 0x40240c
push ebx
lea eax, [esp + 0x1d0]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x4023f8
lea edi, [esp + 0x1d0]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xc4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov ebp, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0xc4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.ws2_32
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0xc4]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebp
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov esi, eax
test esi, esi
je 0x402340
push str.getaddrinfo
push esi
call ebx
test eax, eax
jne 0x4023c1
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
lea edi, [esp + 0x1d0]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0xc4]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0xc4]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, str.wship6
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
lea eax, [esp + 0xc4]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
call ebp
mov esi, eax
test esi, esi
je 0x4023f1
push str.getaddrinfo
push esi
call ebx
test eax, eax
jne 0x4023c1
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
jmp 0x4023f1
xor ebp, ebp
lea edi, [esp + 0x1c]
mov ecx, dword [edi - 4]
push ecx
push esi
call ebx
test eax, eax
mov dword [edi], eax
je 0x4023b8
inc ebp
add edi, 8
cmp ebp, 3
jl 0x4023c7
xor eax, eax
mov edx, dword [esp + eax + 0x1c]
mov dword [eax + 0x4138ac], edx
add eax, 8
cmp eax, 0x18
jl 0x4023df
mov edi, dword [esp + 0x3e8]
mov eax, dword [0x4138bc]
mov ecx, dword [esp + 0x10]
mov dword [0x41ba60], 1
pop ebx
mov dword [0x41ba64], eax
push ecx
call eax
mov eax, dword [edi]
mov dword [eax + 0x1c], 0
mov ecx, dword [edi]
mov eax, dword [ecx + 0x14]
test eax, eax
je 0x402429
mov byte [eax], 0
pop edi
pop esi
xor eax, eax
pop ebp
add esp, 0x3c8
ret
pop edi
pop esi
mov eax, 0x2afb
pop ebp
add esp, 0x3c8
ret