Function at 0x10510060
Capabilities:
Get hostname

Disassembly:
sub esp, 0x140
mov eax, dword [0x10a78b80]
xor eax, esp
mov dword [esp + 0x13c], eax
mov eax, dword [esp + 0x14c]
push ebx
mov ebx, dword [esp + 0x148]
push ebp
mov ebp, dword [esp + 0x150]
push esi
push ebx
push dword [sym.imp.WS2_32.dll_getpeername]
mov dword [esp + 0x20], ebx
mov dword [esp + 0x14], eax
mov dword [esp + 0x1c], 0
call fcn.105105f0
mov esi, eax
add esp, 8
mov eax, dword [sym.imp.WS2_32.dll_getsockname]
mov dword [esp + 0x1c], eax
test esi, esi
jne 0x105100fb
push ebx
push eax
call fcn.105105f0
mov esi, eax
add esp, 8
test esi, esi
je 0x105100d9
cmp word [esi], 1
je 0x105100f3
push esi
call fcn.1051f7a2
add esp, 4
pop esi
pop ebp
xor eax, eax
pop ebx
mov ecx, dword [esp + 0x13c]
xor ecx, esp
call fcn.105116c0
add esp, 0x140
ret
mov dword [esp + 0x14], 1
movzx eax, word [esi]
xor ebx, ebx
push edi
xor edi, edi
mov dword [esp + 0x14], 0x100
mov edx, 0x100
sub eax, 1
je 0x10510192
sub eax, 1
je 0x1051016c
sub eax, 0x15
jne 0x10510336
lea edi, [esi + 8]
lea ebx, [eax + 0x10]
cmp word [edi], ax
jne 0x105102cd
cmp word [edi + 2], ax
jne 0x10510299
cmp word [edi + 4], ax
jne 0x10510299
cmp word [edi + 6], ax
jne 0x10510299
cmp word [edi + 8], ax
jne 0x10510299
mov eax, 0xffff
cmp word [edi + 0xa], ax
jne 0x10510299
add edi, 0xc
test edi, edi
lea eax, [esi + 4]
push 0x7f000001
cmovne eax, edi
mov ebx, 4
mov edi, eax
call dword [sym.imp.WS2_32.dll_htonl]
cmp dword [edi], eax
je 0x10510192
mov dword [esp + 0x14], 0
push dword [esp + 0x10]
lea eax, [esp + 0x28]
push 0x10720280
push 0x28
push eax
call fcn.1006d500
add esp, 0x10
test eax, eax
js 0x10510336
mov ecx, 0x27
cmp eax, ecx
cmovb ecx, eax
mov eax, 0x100
mov dword [esp + 0x10], ecx
cmp word [esp + 0x14], ax
jne 0x105101fd
push eax
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
cmp eax, 0xffffffff
je 0x10510336
lea edi, [esp + 0x4c]
mov ebx, edi
lea ecx, [ebx + 1]
nop word [eax + eax]
mov al, byte [ebx]
inc ebx
test al, al
jne 0x105101f0
sub ebx, ecx
mov ecx, dword [esp + 0x10]
push 0x10a78b54
push 0x10a78b4c
push 2
lea eax, [esp + 0x30]
push eax
movzx eax, cx
push eax
push edi
movzx eax, bx
push eax
mov eax, dword [esp + 0x30]
movzx eax, ax
push eax
call fcn.105405a0
mov edi, eax
add esp, 0x20
test edi, edi
je 0x10510336
movzx ebx, word [edi + 0x10]
mov eax, dword [edi + 0x14]
mov dword [esp + 0x10], eax
test ebx, ebx
je 0x10510309
push ebx
call fcn.1051f7bd
add esp, 4
mov dword [ebp + 4], eax
test eax, eax
je 0x10510310
push ebx
push dword [esp + 0x14]
push eax
call fcn.105137c0
add esp, 0xc
mov dword [ebp], ebx
cmp dword [esp + 0x18], 0
jne 0x105102e5
push esi
call fcn.1051f7a2
push dword [esp + 0x20]
push dword [esp + 0x28]
call fcn.105105f0
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x105102e5
push dword [ebp + 4]
call fcn.1051f7a2
add esp, 4
jmp 0x10510317
cmp word [esi + 0xa], 0
jne 0x105102cd
cmp word [esi + 0xc], 0
jne 0x105102cd
cmp word [esi + 0xe], 0
jne 0x105102cd
cmp word [esi + 0x10], 0
jne 0x105102cd
cmp word [esi + 0x12], 0
jne 0x105102cd
cmp word [esi + 0x14], 0
jne 0x105102cd
cmp word [esi + 0x16], dx
jne 0x105102cd
mov cl, 1
jmp 0x105102cf
xor cl, cl
test cl, cl
mov eax, 6
cmovne eax, edx
movzx eax, ax
mov dword [esp + 0x14], eax
jmp 0x10510192
push esi
push edi
push ebp
call fcn.105103e0
mov ebx, eax
add esp, 0xc
test ebx, ebx
je 0x1051028c
push esi
call fcn.1051f7a2
push edi
call fcn.105407c0
add esp, 8
mov eax, ebx
jmp 0x10510341
mov dword [ebp + 4], 0
mov dword [ebp], 0
push esi
call fcn.1051f7a2
push edi
mov dword [ebp + 4], 0
mov dword [ebp], 0
call fcn.105407c0
add esp, 8
jmp 0x1051033f
push esi
call fcn.1051f7a2
add esp, 4
xor eax, eax
mov ecx, dword [esp + 0x14c]
pop edi
pop esi
pop ebp
pop ebx
xor ecx, esp
call fcn.105116c0
add esp, 0x140
ret