Function at 0x401020
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40e951
mov eax, dword fs:[0]
push eax
sub esp, 0x24c
mov eax, dword [0x417170]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x258], edx
mov esi, ecx
mov eax, dword [edx]
mov ebx, dword [ebp + 8]
cmp eax, dword [edx + 4]
je 0x401067
mov ecx, edx
call fcn.00402520
mov eax, dword [ebx]
cmp eax, dword [ebx + 4]
je 0x401075
mov ecx, ebx
call fcn.00402520
push 0x103
lea eax, [ebp - 0x243]
push 0
push eax
mov byte [ebp - 0x244], 0
call fcn.00404350
add esp, 0xc
test esi, esi
je 0x4010b8
cmp word [esi], 0
je 0x4010b8
push esi
push 0x414400
lea eax, [ebp - 0x244]
push 0x104
push eax
call fcn.00402f30
add esp, 0x10
jmp 0x4010ca
push 0x104
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
cmp byte [ebp - 0x244], 0
je 0x401337
mov eax, dword [0x418f20]
test eax, eax
je 0x401257
cmp dword [0x418f1c], 0
je 0x401257
lea ecx, [ebp - 0x24c]
push ecx
push 0
push 0
lea ecx, [ebp - 0x244]
push ecx
mov dword [ebp - 0x24c], 0
call eax
test eax, eax
jne 0x40123d
mov esi, dword [ebp - 0x24c]
test esi, esi
je 0x401337
push 0x2d
push eax
mov byte [ebp - 0x40], al
lea eax, [ebp - 0x3f]
push eax
call fcn.00404350
add esp, 0xc
xor edi, edi
lea esp, [esp]
cmp edi, 0xa
jge 0x40122c
mov eax, dword [esi + 4]
cmp eax, 2
je 0x40115a
cmp eax, 0x17
jne 0x401221
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x40]
push eax
push 0
push dword [esi + 0x10]
mov dword [ebp - 0x248], 0x2e
push dword [esi + 0x18]
call dword [sym.imp.WS2_32.dll_WSAAddressToStringA]
test eax, eax
jne 0x401221
push 0x7e
push eax
mov word [ebp - 0xc0], ax
lea eax, [ebp - 0xbe]
push eax
call fcn.00404350
lea eax, [ebp - 0x40]
push eax
push 0x414404
lea eax, [ebp - 0xc0]
push 0x40
push eax
call fcn.00402ec0
add esp, 0x1c
cmp dword [esi + 4], 2
lea eax, [ebp - 0xc0]
push eax
jne 0x4011ee
lea ecx, [ebp - 0x250]
call fcn.004022e0
mov ecx, dword [ebp - 0x258]
lea eax, [ebp - 0x250]
push eax
mov dword [ebp - 4], 1
call fcn.00402460
lea ecx, [ebp - 0x250]
jmp 0x401214
lea ecx, [ebp - 0x254]
call fcn.004022e0
lea eax, [ebp - 0x254]
push eax
mov ecx, ebx
mov dword [ebp - 4], 2
call fcn.00402460
lea ecx, [ebp - 0x254]
mov dword [ebp - 4], 0xffffffff
call fcn.00402390
inc edi
mov esi, dword [esi + 0x1c]
test esi, esi
jne 0x401140
push dword [ebp - 0x24c]
call dword [0x418f1c]
jmp 0x401337
mov eax, dword [ebp - 0x24c]
test eax, eax
je 0x401337
push eax
call dword [0x418f1c]
jmp 0x401337
lea eax, [ebp - 0x244]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x248], eax
test eax, eax
je 0x401337
mov ecx, dword [eax + 0xc]
xor edi, edi
cmp dword [ecx], edi
je 0x401337
xor esi, esi
cmp edi, 0xa
jge 0x401337
mov eax, dword [esi + ecx]
push dword [eax]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov ebx, eax
test ebx, ebx
je 0x401321
xor eax, eax
push 0x7e
push eax
mov word [ebp - 0x140], ax
lea eax, [ebp - 0x13e]
push eax
call fcn.00404350
push ebx
push 0x414404
lea eax, [ebp - 0x140]
push 0x40
push eax
call fcn.00402ec0
add esp, 0x1c
lea eax, [ebp - 0x140]
push eax
lea ecx, [ebp - 0x250]
call fcn.004022e0
mov ecx, dword [ebp - 0x258]
lea eax, [ebp - 0x250]
push eax
mov dword [ebp - 4], 0
call fcn.00402460
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0x250]
add edx, 0xfffffff0
or ecx, 0xffffffff
lea eax, [edx + 0xc]
lock xadd dword [eax], ecx
dec ecx
test ecx, ecx
jg 0x401320
mov ecx, dword [edx]
push edx
mov eax, dword [ecx]
call dword [eax + 4]
inc edi
mov eax, dword [ebp - 0x248]
add esi, 4
mov ecx, dword [eax + 0xc]
cmp dword [esi + ecx], 0
jne 0x401281
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004039d1
mov esp, ebp
pop ebp
ret