Function at 0x40d720
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x47998b
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x324
push ebx
push ebp
push esi
push edi
mov ebp, ecx
mov eax, dword [ebp + 0xc]
cmp eax, 0xfffffffe
je 0x40d93e
cmp eax, 0xffffffff
jne 0x40d853
inc eax
mov dword [ebp + 0xc], eax
mov eax, dword [ebp]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov esi, eax
xor ebx, ebx
cmp esi, ebx
mov dword [esp + 0x10], esi
jne 0x40d7aa
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.gethostbyname
lea ecx, [esp + 0x234]
call fcn.0044ba90
mov esi, eax
push 0x49859c
lea eax, [esp + 0x20]
mov ecx, 0x41
lea edi, [esp + 0x20]
push eax
rep movsd dword es:[edi], dword [esi]
call fcn.00459658
movsx ecx, word [esi + 0xa]
mov dword [ebp + 8], ecx
mov eax, dword [esi + 0xc]
mov ecx, dword [eax]
xor edi, edi
cmp ecx, ebx
je 0x40d7cb
lea esp, [esp]
mov ecx, dword [eax + 4]
add eax, 4
inc edi
cmp ecx, ebx
jne 0x40d7c0
lea edx, [edi*4 + 4]
push edx
call fcn.00459034
mov dword [ebp + 4], eax
mov dword [eax + edi*4], ebx
mov eax, dword [esi + 0xc]
mov ecx, dword [eax]
add esp, 4
cmp ecx, ebx
je 0x40d836
lea ebx, [ebx]
movsx ecx, word [esi + 0xa]
push ecx
call fcn.00459034
mov edx, dword [ebp + 4]
mov dword [ebx + edx], eax
mov eax, dword [esi + 0xc]
mov esi, dword [ebx + eax]
mov ecx, dword [ebp + 8]
mov edx, dword [ebp + 4]
mov edi, dword [edx + ebx]
mov eax, ecx
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov ecx, dword [esp + 0x14]
mov edx, dword [ecx + 0xc]
mov eax, dword [ebx + edx + 4]
add ebx, 4
add esp, 4
test eax, eax
mov esi, ecx
jne 0x40d7f0
xor ebx, ebx
mov eax, dword [esi]
push str.gethostbyname
push eax
mov ecx, ebp
call fcn.0040d650
test al, al
je 0x40d855
mov ecx, dword [esi]
push 0xffffffffffffffff
push ecx
jmp 0x40d96c
xor ebx, ebx
mov al, byte [ebp + 0x1c]
test al, al
jne 0x40d91f
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 4]
mov esi, dword [edx + eax*4]
inc eax
cmp esi, ebx
mov dword [ebp + 0xc], eax
jne 0x40d87d
mov byte [ebp + 0x1c], 1
mov dword [ebp + 0xc], ebx
jmp 0x40d914
mov eax, dword [ebp + 8]
push 2
push eax
push esi
call dword [sym.imp.WS2_32.dll_gethostbyaddr]
mov edi, eax
cmp edi, ebx
jne 0x40d901
call fcn.0045b175
mov edi, dword [eax]
mov dword [esp + 0x10], ebx
mov esi, dword [esi]
push esi
mov dword [esp + 0x340], ebx
call dword [sym.imp.WS2_32.dll_inet_ntoa]
push eax
lea ecx, [esp + 0x14]
push str.gethostbyaddr__s_
push ecx
call fcn.0044b320
mov edx, dword [esp + 0x1c]
add esp, 0xc
push edi
push edx
lea ecx, [esp + 0x128]
call fcn.0044ba90
lea eax, [esp + 0x120]
push eax
push 0x48446c
push 0x4a6d90
call fcn.00402c00
mov ecx, dword [esp + 0x1c]
push ecx
mov dword [esp + 0x34c], 0xffffffff
call fcn.00459039
add esp, 0x10
jmp 0x40d914
mov edx, dword [edi]
push str.gethostbyaddr
push edx
mov ecx, ebp
call fcn.0040d650
test al, al
jne 0x40d937
mov al, byte [ebp + 0x1c]
test al, al
je 0x40d860
xor eax, eax
mov ecx, dword [esp + 0x334]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [edi]
push 0xffffffffffffffff
push eax
jmp 0x40d96c
mov ecx, dword [ebp]
push ecx
inc eax
push 0x484504
push 0x4a6d90
mov dword [ebp + 0xc], eax
call fcn.00402ee0
add esp, 0xc
push ebp
lea edx, [esp + 0x18]
push edx
lea ecx, [ebp + 0x10]
call fcn.0040d510
mov ebp, dword [ebp]
push 0xffffffffffffffff
push ebp
call fcn.0044b020
mov ecx, dword [esp + 0x33c]
add esp, 8
pop edi
mov dword fs:[0], ecx
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret