Function at 0x402f70
Capabilities:
Get hostname
Get session user name
Initialize winsock library
Resolve dns

Disassembly:
mov eax, dword fs:[0]
push 0xffffffffffffffff
push 0x42349b
push eax
mov dword fs:[0], esp
sub esp, 0x45c
lea eax, [esp + 0x2cc]
push ebx
push ebp
push esi
push edi
push eax
push 0x101
call sub.WSOCK32.dll_WSAStartup
mov ebx, dword [esp + 0x47c]
test eax, eax
je 0x402fe4
mov edi, 0x42b380
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b380
mov ecx, ebx
call fcn.00409720
mov edi, 0x42b364
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b364
mov ecx, ebx
call fcn.00409720
lea ecx, [esp + 0x1dc]
push 0xff
push ecx
call sub.WSOCK32.dll_gethostname
cmp eax, 0xffffffff
mov edi, 0x42b380
jne 0x40302e
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b380
mov ecx, ebx
call fcn.00409720
mov edi, 0x42b354
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b354
jmp 0x40307b
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b380
mov ecx, ebx
call fcn.00409720
mov edi, 0x42b344
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b344
mov ecx, ebx
call fcn.00409720
lea edi, [esp + 0x1dc]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x1dc]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
mov ecx, ebx
call fcn.00409720
lea eax, [esp + 0x20]
lea ecx, [esp + 0x8c]
push eax
push ecx
mov dword [esp + 0x28], 0x50
call dword [sym.imp.ADVAPI32.dll_GetUserNameA]
test eax, eax
mov edi, 0x42b380
je 0x4030f5
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b380
mov ecx, ebx
call fcn.00409720
mov edi, 0x42b334
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b334
mov ecx, ebx
call fcn.00409720
lea edi, [esp + 0x8c]
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x8c]
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push edx
jmp 0x403121
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b380
mov ecx, ebx
call fcn.00409720
mov edi, 0x42b324
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b324
mov ecx, ebx
call fcn.00409720
lea eax, [esp + 0x1dc]
push eax
call sub.WSOCK32.dll_gethostbyname
test eax, eax
mov dword [esp + 0x24], eax
jne 0x403178
mov edi, 0x42b380
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b380
mov ecx, ebx
call fcn.00409720
mov edi, 0x42b308
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b308
mov ecx, ebx
call fcn.00409720
jmp 0x403339
mov eax, dword [eax + 0xc]
cmp dword [eax], 0
je 0x403339
xor ecx, ecx
mov dword [esp + 0x1c], 1
mov dword [esp + 0x10], ecx
mov ecx, dword [ecx + eax]
mov eax, dword [esp + 0x1c]
push eax
push 0x42b304
mov edx, dword [ecx]
lea ecx, [esp + 0x40]
push ecx
mov dword [esp + 0x24], edx
call fcn.004175e8
mov edi, 0x42b380
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b380
mov ecx, ebx
call fcn.00409720
mov edi, 0x42b300
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
push ecx
push 0x42b300
mov ecx, ebx
call fcn.00409720
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [0x425254]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [ebx + 8]
sub edx, ecx
cmp edx, esi
ja 0x40320e
call fcn.0040a869
test esi, esi
jbe 0x403249
mov ebp, dword [ebx + 8]
push 0
add ebp, esi
mov ecx, ebx
push ebp
call fcn.004098a0
test al, al
je 0x403249
mov edi, dword [ebx + 4]
mov eax, dword [ebx + 8]
mov ecx, esi
add edi, eax
mov eax, ecx
lea esi, [esp + 0x38]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call fcn.00409880
mov edi, 0x42b2f0
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebx + 8]
repne scasb al, byte es:[edi]
mov eax, dword [0x425254]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x40326d
call fcn.0040a869
test esi, esi
jbe 0x4032a9
mov ebp, dword [ebx + 8]
push 0
add ebp, esi
mov ecx, ebx
push ebp
call fcn.004098a0
test al, al
je 0x4032a9
mov edi, dword [ebx + 4]
mov ecx, dword [ebx + 8]
add edi, ecx
mov ecx, esi
mov edx, ecx
mov esi, 0x42b2f0
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call fcn.00409880
mov eax, dword [esp + 0x18]
push eax
call sub.WSOCK32.dll_inet_ntoa
mov dword [esp + 0x18], eax
mov edi, eax
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
mov edx, dword [ebx + 8]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [0x425254]
sub ecx, edx
cmp ecx, esi
ja 0x4032d9
call fcn.0040a869
test esi, esi
jbe 0x403314
mov ebp, dword [ebx + 8]
push 0
add ebp, esi
mov ecx, ebx
push ebp
call fcn.004098a0
test al, al
je 0x403314
mov edi, dword [ebx + 4]
mov ecx, dword [ebx + 8]
add edi, ecx
mov ecx, esi
mov esi, dword [esp + 0x18]
mov edx, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call fcn.00409880
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x10]
mov edi, dword [esp + 0x1c]
add ecx, 4
mov eax, dword [eax + 0xc]
inc edi
mov dword [esp + 0x1c], edi
mov dword [esp + 0x10], ecx
cmp dword [ecx + eax], 0
jne 0x403192
call sub.WSOCK32.dll_WSACleanup
mov ecx, 0x10
xor eax, eax
lea edi, [esp + 0x4c]
lea edx, [esp + 0x4c]
rep stosd dword es:[edi], eax
lea ecx, [esp + 0xdc]
push edx
mov byte [esp + 0x50], 0x37
mov dword [esp + 0x54], ecx
mov word [esp + 0x58], pe_nt_image_headers32
call sub.NETAPI32.dll_Netbios
mov al, byte [esp + 0x17]
push 0
lea ecx, [esp + 0x2c]
mov byte [esp + 0x2c], al
call fcn.00408b40
mov cl, byte [esp + 0xdc]
xor eax, eax
test cl, cl
mov dword [esp + 0x474], 0
mov dword [esp + 0x10], eax
jbe 0x403652
lea esi, [esp + eax + 0xdd]
xor edx, edx
lea ecx, [esp + 0x28]
mov dl, byte [esi]
push ecx
push edx
call fcn.00402ca0
add esp, 8
test al, al
je 0x40358e
xor eax, eax
lea ecx, [esp + 0x38]
mov al, byte [esi]
push eax
push 0x42b304
push ecx
call fcn.004175e8
mov edi, 0x42b380
or ecx, 0xffffffff
xor eax, eax
add esp, 0xc
repne scasb al, byte es:[edi]
mov edx, dword [0x425254]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [ebx + 8]
sub edx, ecx
cmp edx, esi
ja 0x4033fc
call fcn.0040a869
test esi, esi
jbe 0x403438
mov ebp, dword [ebx + 8]
push 0
add ebp, esi
mov ecx, ebx
push ebp
call fcn.004098a0
test al, al
je 0x403438
mov edi, dword [ebx + 4]
mov eax, dword [ebx + 8]
mov ecx, esi
add edi, eax
mov eax, ecx
mov esi, 0x42b380
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call fcn.00409880
mov edi, 0x42b2e8
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebx + 8]
repne scasb al, byte es:[edi]
not ecx
dec ecx
mov esi, ecx
mov ecx, dword [0x425254]
sub ecx, edx
cmp ecx, esi
ja 0x40345d
call fcn.0040a869
test esi, esi
jbe 0x403499
mov ebp, dword [ebx + 8]
push 0
add ebp, esi
mov ecx, ebx
push ebp
call fcn.004098a0
test al, al
je 0x403499
mov edi, dword [ebx + 4]
mov edx, dword [ebx + 8]
mov ecx, esi
add edi, edx
mov edx, ecx
mov esi, 0x42b2e8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call fcn.00409880
lea edi, [esp + 0x38]
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebx + 8]
repne scasb al, byte es:[edi]
mov eax, dword [0x425254]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x4034bc
call fcn.0040a869
test esi, esi
jbe 0x4034f7
mov ebp, dword [ebx + 8]
push 0
add ebp, esi
mov ecx, ebx
push ebp
call fcn.004098a0
test al, al
je 0x4034f7
mov edi, dword [ebx + 4]
mov edx, dword [ebx + 8]
mov ecx, esi
add edi, edx
mov edx, ecx
lea esi, [esp + 0x38]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call fcn.00409880
mov edi, 0x42b2d8
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebx + 8]
repne scasb al, byte es:[edi]
mov eax, dword [0x425254]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x40351b
call fcn.0040a869
test esi, esi
jbe 0x403557
mov ebp, dword [ebx + 8]
push 0
add ebp, esi
mov ecx, ebx
push ebp
call fcn.004098a0
test al, al
je 0x403557
mov edi, dword [ebx + 4]
mov edx, dword [ebx + 8]
mov ecx, esi
add edi, edx
mov edx, ecx
mov esi, 0x42b2d8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
push ebp
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, ebx
call fcn.00409880
mov eax, dword [0x425254]
lea ecx, [esp + 0x28]
push eax
push 0
push ecx
mov ecx, ebx
call fcn.00409640
mov eax, dword [esp + 0x10]
mov edx, dword [esp + 0xdc]
inc eax
and edx, 0xff
cmp eax, edx
mov dword [esp + 0x10], eax
jl 0x40339f
jmp 0x403652
mov edi, 0x42b380
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebx + 8]
repne scasb al, byte es:[edi]
mov eax, dword [0x425254]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x4035b2
call fcn.0040a869
test esi, esi
jbe 0x4035f0
mov ebp, dword [ebx + 8]
push 0
add ebp, esi
mov ecx, ebx
push ebp
call fcn.004098a0
test al, al
je 0x4035f0
mov edi, dword [ebx + 8]
mov edx, dword [ebx + 4]
mov ecx, esi
add edi, edx
mov edx, ecx
mov esi, 0x42b380
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 4]
mov dword [ebx + 8], ebp
mov byte [eax + ebp], 0
mov edi, 0x42b2c8
or ecx, 0xffffffff
xor eax, eax
mov edx, dword [ebx + 8]
repne scasb al, byte es:[edi]
mov eax, dword [0x425254]
not ecx
dec ecx
sub eax, edx
mov esi, ecx
cmp eax, esi
ja 0x403614
call fcn.0040a869
test esi, esi
jbe 0x403652
mov ebp, dword [ebx + 8]
push 0
add ebp, esi
mov ecx, ebx
push ebp
call fcn.004098a0
test al, al
je 0x403652
mov edi, dword [ebx + 8]
mov edx, dword [ebx + 4]
mov ecx, esi
add edi, edx
mov edx, ecx
mov esi, 0x42b2c8
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebx + 4]
mov dword [ebx + 8], ebp
mov byte [eax + ebp], 0
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebp
test ecx, ecx
pop ebx
je 0x40368d
mov al, byte [ecx - 1]
test al, al
je 0x403683
cmp al, 0xff
je 0x403683
dec al
mov byte [ecx - 1], al
mov ecx, dword [esp + 0x45c]
mov dword fs:[0], ecx
add esp, 0x468
ret
dec ecx
push ecx
call fcn.0040a85e
add esp, 4
mov ecx, dword [esp + 0x45c]
mov dword fs:[0], ecx
add esp, 0x468
ret