Function at 0x4a6310
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5d0b26
mov eax, dword fs:[0]
push eax
sub esp, 0x22c
mov eax, dword [0x6385e0]
xor eax, ebp
mov dword [ebp - 0x44], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x238], ecx
lea ecx, [ebp - 0x20]
call fcn.004a8a80
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x40]
call fcn.0042f9e0
mov byte [ebp - 4], 1
mov dword [ebp - 0x1cc], 0
lea eax, [ebp - 0x1cc]
push eax
lea ecx, [ebp - 0x1d8]
push ecx
lea ecx, [ebp - 0x40]
call fcn.004a8c30
mov dword [ebp - 0x1dc], 0x7f000001
lea edx, [ebp - 0x1dc]
push edx
lea eax, [ebp - 0x1e8]
push eax
lea ecx, [ebp - 0x40]
call fcn.004a8c30
mov cl, byte [0x600950]
mov byte [ebp - 0xc4], cl
push 0x7f
push 0
lea edx, [ebp - 0xc3]
push edx
call fcn.00555bf0
add esp, 0xc
push 0x80
lea eax, [ebp - 0xc4]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
test eax, eax
jne 0x4a649f
lea ecx, [ebp - 0xc4]
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0xc8], eax
cmp dword [ebp - 0xc8], 0
je 0x4a648b
mov dword [ebp - 0xdc], 0
jmp 0x4a6410
mov edx, dword [ebp - 0xdc]
add edx, 1
mov dword [ebp - 0xdc], edx
mov eax, dword [ebp - 0xc8]
mov ecx, dword [eax + 0xc]
mov edx, dword [ebp - 0xdc]
cmp dword [ecx + edx*4], 0
je 0x4a6489
cmp dword [ebp - 0xdc], 0xa
jge 0x4a6489
mov eax, dword [ebp - 0xc8]
movsx ecx, word [eax + 0xa]
push ecx
mov edx, dword [ebp - 0xc8]
mov eax, dword [edx + 0xc]
mov ecx, dword [ebp - 0xdc]
mov edx, dword [eax + ecx*4]
push edx
lea eax, [ebp - 0xd4]
push eax
call fcn.00555c70
add esp, 0xc
mov ecx, dword [ebp - 0xd4]
push ecx
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x1ec], eax
lea edx, [ebp - 0x1ec]
push edx
lea eax, [ebp - 0x1f8]
push eax
lea ecx, [ebp - 0x40]
call fcn.004a8c30
jmp 0x4a6401
jmp 0x4a649f
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.gethostbyname___failed_with__u_r_n
call fcn.0054d5e0
add esp, 8
cmp dword [0x643684], 0
je 0x4a67cb
push 2
push 2
call dword [sym.imp.KERNEL32.dll_GetProcessHeap]
push eax
push 1
lea ecx, [ebp - 0xe0]
push ecx
call dword [0x643684]
mov dword [ebp - 0xe4], eax
cmp dword [ebp - 0xe4], 0
je 0x4a64ee
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.NetworkEnumerator_AllocateAndGetTcpExTableFromStack___failed_with__u_r_n
call fcn.0054d5e0
add esp, 8
jmp 0x4a67c6
mov dword [ebp - 0xe8], 0
jmp 0x4a6509
mov edx, dword [ebp - 0xe8]
add edx, 1
mov dword [ebp - 0xe8], edx
mov eax, dword [ebp - 0xe0]
mov ecx, dword [ebp - 0xe8]
cmp ecx, dword [eax]
jae 0x4a67c6
mov edx, dword [ebp - 0xe8]
imul edx, edx, 0x18
mov eax, dword [ebp - 0xe0]
mov ecx, dword [eax + edx + 4]
mov dword [ebp - 0xec], ecx
cmp dword [ebp - 0xec], 5
je 0x4a654c
cmp dword [ebp - 0xec], 2
jne 0x4a67c1
mov edx, dword [ebp - 0xe8]
imul edx, edx, 0x18
mov eax, dword [ebp - 0xe0]
mov ecx, dword [eax + edx + 0x10]
push ecx
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0xf8], eax
mov edx, dword [ebp - 0xe8]
imul edx, edx, 0x18
mov eax, dword [ebp - 0xe0]
movzx ecx, word [eax + edx + 0x14]
push ecx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0xf0], ax
mov byte [ebp - 0xf1], 0
lea edx, [ebp - 0xf8]
push edx
lea eax, [ebp - 0x200]
push eax
lea ecx, [ebp - 0x40]
call fcn.0042fa10
mov ecx, dword [eax]
mov edx, dword [eax + 4]
mov dword [ebp - 0x100], ecx
mov dword [ebp - 0xfc], edx
lea eax, [ebp - 0x208]
push eax
lea ecx, [ebp - 0x40]
call fcn.0040c9a0
push eax
lea ecx, [ebp - 0x100]
call fcn.0047f720
movzx ecx, al
test ecx, ecx
je 0x4a6609
cmp dword [ebp - 0xec], 2
jne 0x4a65fd
movzx edx, word [ebp - 0xf0]
neg edx
sbb edx, edx
add edx, 1
mov byte [ebp - 0xf1], dl
jmp 0x4a6604
mov byte [ebp - 0xf1], 1
jmp 0x4a6689
mov eax, dword [ebp - 0xf8]
and eax, 0xff000000
cmp eax, 0xa000000
jne 0x4a6624
mov byte [ebp - 0xf1], 1
jmp 0x4a6689
mov ecx, dword [ebp - 0xf8]
and ecx, 0xff000000
cmp ecx, 0xac000000
jne 0x4a666e
mov edx, dword [ebp - 0xf8]
and edx, 0xff0000
shr edx, 0x10
mov byte [ebp - 0x101], dl
movzx eax, byte [ebp - 0x101]
cmp eax, 0x10
jl 0x4a666c
movzx ecx, byte [ebp - 0x101]
cmp ecx, 0x1f
jg 0x4a666c
mov byte [ebp - 0xf1], 1
jmp 0x4a6689
mov edx, dword [ebp - 0xf8]
and edx, 0xffff0000
cmp edx, 0xc0a80000
jne 0x4a6689
mov byte [ebp - 0xf1], 1
movzx eax, byte [ebp - 0xf1]
test eax, eax
jne 0x4a67c1
mov ecx, dword [ebp - 0xe8]
imul ecx, ecx, 0x18
mov edx, dword [ebp - 0xe0]
mov eax, dword [edx + ecx + 0x18]
mov dword [ebp - 0x10c], eax
mov ecx, dword [ebp - 0x10c]
push ecx
mov edx, dword [ebp - 0x238]
mov ecx, dword [edx + 4]
call fcn.00421ba0
mov dword [ebp - 0x108], eax
cmp dword [ebp - 0x108], 0
je 0x4a67c1
xor eax, eax
cmp dword [ebp - 0xec], 2
sete al
mov byte [ebp - 0x14d], al
movzx ecx, byte [ebp - 0x14d]
test ecx, ecx
je 0x4a6716
movzx edx, word [ebp - 0xf0]
push edx
push 0x5fc120
push 0x20
lea eax, [ebp - 0x14c]
push eax
call fcn.0054e0f2
add esp, 0x10
jmp 0x4a6770
movzx ecx, word [ebp - 0xf0]
push ecx
mov edx, dword [ebp - 0xf8]
and edx, 0xff
push edx
mov eax, dword [ebp - 0xf8]
shr eax, 8
and eax, 0xff
push eax
mov ecx, dword [ebp - 0xf8]
shr ecx, 0x10
and ecx, 0xff
push ecx
mov edx, dword [ebp - 0xf8]
shr edx, 0x18
and edx, 0xff
push edx
push str._d._d._d._d:_d
push 0x20
lea eax, [ebp - 0x14c]
push eax
call fcn.0054e0f2
add esp, 0x20
lea ecx, [ebp - 0x14c]
push ecx
lea ecx, [ebp - 0x214]
call fcn.004b3550
mov byte [ebp - 4], 2
lea edx, [ebp - 0x214]
push edx
mov ecx, dword [ebp - 0x108]
call fcn.004a5c10
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x214]
call fcn.004b3860
movzx eax, byte [ebp - 0x14d]
test eax, eax
je 0x4a67c1
lea ecx, [ebp - 0x108]
push ecx
lea ecx, [ebp - 0x1c]
call fcn.004c69f0
jmp 0x4a64fa
jmp 0x4a6b62
cmp dword [0x64368c], 0
je 0x4a6b62
mov dword [ebp - 0x15c], 0
mov dword [ebp - 0x154], 0
push 0
push 8
push 2
push 0
lea edx, [ebp - 0x154]
push edx
push 0
call dword [0x64368c]
mov dword [ebp - 0x158], eax
cmp dword [ebp - 0x158], 0x7a
jne 0x4a6849
mov eax, dword [ebp - 0x154]
push eax
call fcn.0054ea24
add esp, 4
mov dword [ebp - 0x15c], eax
push 0
push 8
push 2
push 0
lea ecx, [ebp - 0x154]
push ecx
mov edx, dword [ebp - 0x15c]
push edx
call dword [0x64368c]
mov dword [ebp - 0x158], eax
cmp dword [ebp - 0x158], 0
je 0x4a686b
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push str.NetworkEnumerator_GetExtendedTcpTable___failed_with__u_r_n
call fcn.0054d5e0
add esp, 8
jmp 0x4a6b4a
mov dword [ebp - 0x160], 0
jmp 0x4a6886
mov eax, dword [ebp - 0x160]
add eax, 1
mov dword [ebp - 0x160], eax
mov ecx, dword [ebp - 0x15c]
mov edx, dword [ebp - 0x160]
cmp edx, dword [ecx]
jae 0x4a6b4a
mov eax, dword [ebp - 0x160]
imul eax, eax, 0xa0
mov ecx, dword [ebp - 0x15c]
mov edx, dword [ecx + eax + 8]
mov dword [ebp - 0x164], edx
cmp dword [ebp - 0x164], 5
je 0x4a68cc
cmp dword [ebp - 0x164], 2
jne 0x4a6b45
mov eax, dword [ebp - 0x160]
imul eax, eax, 0xa0
mov ecx, dword [ebp - 0x15c]
mov edx, dword [ecx + eax + 0x14]
push edx
call dword [sym.imp.WS2_32.dll_htonl]
mov dword [ebp - 0x170], eax
mov eax, dword [ebp - 0x160]
imul eax, eax, 0xa0
mov ecx, dword [ebp - 0x15c]
movzx edx, word [ecx + eax + 0x18]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x168], ax
mov byte [ebp - 0x169], 0
lea eax, [ebp - 0x170]
push eax
lea ecx, [ebp - 0x21c]
push ecx
lea ecx, [ebp - 0x40]
call fcn.0042fa10
mov edx, dword [eax]
mov eax, dword [eax + 4]
mov dword [ebp - 0x178], edx
mov dword [ebp - 0x174], eax
lea ecx, [ebp - 0x224]
push ecx
lea ecx, [ebp - 0x40]
call fcn.0040c9a0
push eax
lea ecx, [ebp - 0x178]
call fcn.0047f720
movzx edx, al
test edx, edx
je 0x4a698c
cmp dword [ebp - 0x164], 2
jne 0x4a6983
movzx eax, word [ebp - 0x168]
neg eax
sbb eax, eax
add eax, 1
mov byte [ebp - 0x169], al
jmp 0x4a698a
mov byte [ebp - 0x169], 1
jmp 0x4a6a0b
mov ecx, dword [ebp - 0x170]
and ecx, 0xff000000
cmp ecx, 0xa000000
jne 0x4a69a9
mov byte [ebp - 0x169], 1
jmp 0x4a6a0b
mov edx, dword [ebp - 0x170]
and edx, 0xff000000
cmp edx, 0xac000000
jne 0x4a69f2
mov eax, dword [ebp - 0x170]
and eax, 0xff0000
shr eax, 0x10
mov byte [ebp - 0x179], al
movzx ecx, byte [ebp - 0x179]
cmp ecx, 0x10
jl 0x4a69f0
movzx edx, byte [ebp - 0x179]
cmp edx, 0x1f
jg 0x4a69f0
mov byte [ebp - 0x169], 1
jmp 0x4a6a0b
mov eax, dword [ebp - 0x170]
and eax, 0xffff0000
cmp eax, 0xc0a80000
jne 0x4a6a0b
mov byte [ebp - 0x169], 1
movzx ecx, byte [ebp - 0x169]
test ecx, ecx
jne 0x4a6b45
mov edx, dword [ebp - 0x160]
imul edx, edx, 0xa0
mov eax, dword [ebp - 0x15c]
mov ecx, dword [eax + edx + 0x1c]
mov dword [ebp - 0x184], ecx
mov edx, dword [ebp - 0x184]
push edx
mov eax, dword [ebp - 0x238]
mov ecx, dword [eax + 4]
call fcn.00421ba0
mov dword [ebp - 0x180], eax
cmp dword [ebp - 0x180], 0
je 0x4a6b45
xor ecx, ecx
cmp dword [ebp - 0x164], 2
sete cl
mov byte [ebp - 0x1c5], cl
movzx edx, byte [ebp - 0x1c5]
test edx, edx
je 0x4a6a9b
movzx eax, word [ebp - 0x168]
push eax
push 0x5fc120
push 0x20
lea ecx, [ebp - 0x1c4]
push ecx
call fcn.0054e0f2
add esp, 0x10
jmp 0x4a6af4
movzx edx, word [ebp - 0x168]
push edx
mov eax, dword [ebp - 0x170]
and eax, 0xff
push eax
mov ecx, dword [ebp - 0x170]
shr ecx, 8
and ecx, 0xff
push ecx
mov edx, dword [ebp - 0x170]
shr edx, 0x10
and edx, 0xff
push edx
mov eax, dword [ebp - 0x170]
shr eax, 0x18
and eax, 0xff
push eax
push str._d._d._d._d:_d
push 0x20
lea ecx, [ebp - 0x1c4]
push ecx
call fcn.0054e0f2
add esp, 0x20
lea edx, [ebp - 0x1c4]
push edx
lea ecx, [ebp - 0x230]
call fcn.004b3550
mov byte [ebp - 4], 3
lea eax, [ebp - 0x230]
push eax
mov ecx, dword [ebp - 0x180]
call fcn.004a5c10
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x230]
call fcn.004b3860
movzx ecx, byte [ebp - 0x1c5]
test ecx, ecx
je 0x4a6b45
lea edx, [ebp - 0x180]
push edx
lea ecx, [ebp - 0x1c]
call fcn.004c69f0
jmp 0x4a6877
cmp dword [ebp - 0x15c], 0
je 0x4a6b62
mov eax, dword [ebp - 0x15c]
push eax
call fcn.0054eaee
add esp, 4
mov ecx, dword [ebp - 0x238]
call fcn.004a7f90
mov ecx, dword [ebp - 0x238]
call fcn.004a7150
lea ecx, [ebp - 0x20]
push ecx
mov ecx, dword [ebp - 0x238]
call fcn.004a6bd0
mov byte [ebp - 0x231], 1
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x40]
call fcn.0047dfd0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x20]
call fcn.004a8ae0
mov al, byte [ebp - 0x231]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x44]
xor ecx, ebp
call fcn.0054d4f5
mov esp, ebp
pop ebp
ret