Function at 0x521e80
Capabilities:
Get hostname
Resolve dns

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x59ce8b
mov eax, dword fs:[0]
push eax
sub esp, 0x1a8
mov eax, dword [0x5f88c0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x170], eax
mov dword [ebp - 0x184], eax
call fcn.00522370
push 0x100
call fcn.0054b297
push 0x100
push 0
push eax
lea edi, [eax + 0x100]
mov dword [ebp - 0x160], eax
mov dword [ebp - 0x190], eax
mov dword [ebp - 0x16c], edi
mov dword [ebp - 0x188], edi
call fcn.0054d9f0
mov esi, edi
add esp, 0x10
mov dword [ebp - 0x18c], esi
push 0xff
push dword [ebp - 0x160]
mov dword [ebp - 4], 0
call dword [sym.imp.WS2_32.dll_gethostname]
mov ecx, dword [ebp - 0x160]
mov edx, ecx
mov dword [ebp - 0x174], edx
test eax, eax
je 0x52204a
mov edi, ecx
mov dword [ebp - 0x168], ecx
mov dword [ebp - 0x180], ecx
mov dword [ebp - 0x178], ecx
mov dword [ebp - 0x17c], ecx
jmp 0x521f56
mov edi, dword [ebp - 0x160]
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
mov dword [ebp - 0x174], eax
cmp eax, 0x271e
jne 0x5221f5
mov eax, dword [ebp - 0x178]
mov ecx, esi
mov edx, esi
mov dword [ebp - 0x180], eax
sub edx, dword [ebp - 0x17c]
sub ecx, edi
cmp ecx, 0x2000
ja 0x5221ef
lea edi, [edx + edx]
mov byte [ebp - 0x161], 0
mov edx, dword [ebp - 0x168]
mov ecx, esi
sub ecx, edx
cmp edi, ecx
jae 0x521fae
lea esi, [edx + edi]
jmp 0x521fff
jbe 0x522005
mov eax, dword [ebp - 0x16c]
sub eax, edx
cmp edi, eax
jbe 0x521fef
lea eax, [ebp - 0x161]
push eax
push edi
lea ecx, [ebp - 0x190]
call fcn.00521a50
mov edi, dword [ebp - 0x188]
mov eax, dword [ebp - 0x190]
mov esi, dword [ebp - 0x18c]
mov dword [ebp - 0x16c], edi
mov dword [ebp - 0x160], eax
jmp 0x52200b
sub edi, ecx
push edi
push 0
push esi
call fcn.0054d9f0
add esp, 0xc
add esi, edi
mov dword [ebp - 0x18c], esi
mov edi, dword [ebp - 0x16c]
mov ecx, dword [ebp - 0x160]
mov eax, esi
sub eax, ecx
dec eax
push eax
push ecx
call dword [sym.imp.WS2_32.dll_gethostname]
mov edx, dword [ebp - 0x160]
mov dword [ebp - 0x174], edx
mov dword [ebp - 0x17c], edx
mov dword [ebp - 0x180], edx
mov dword [ebp - 0x178], edx
mov dword [ebp - 0x168], edx
test eax, eax
jne 0x521f50
cmp byte [ebp + 0xc], 0
je 0x52234b
push 0x110
xorps xmm0, xmm0
mov dword [ebp - 0x1b0], 2
lea eax, [ebp - 0x150]
movlpd qword [ebp - 0x1ac], xmm0
push 0
push eax
movlpd qword [ebp - 0x1a4], xmm0
movlpd qword [ebp - 0x19c], xmm0
call fcn.0054d9f0
mov esi, dword [sym.imp.KERNEL32.dll_VerSetConditionMask]
add esp, 0xc
mov dword [ebp - 0x15c], 0x11c
mov dword [ebp - 0x158], 6
mov dword [ebp - 0x154], 1
push 3
push 2
push 0
push 0
call esi
push 3
push 1
push edx
push eax
call esi
push edx
push eax
push 3
lea eax, [ebp - 0x15c]
push eax
call dword [sym.imp.KERNEL32.dll_VerifyVersionInfoW]
neg eax
mov dword [ebp - 0x17c], 0
sbb eax, eax
and eax, 0x1fffe
add eax, 2
mov dword [ebp - 0x1b4], eax
mov esi, dword [ebp - 0x174]
lea eax, [ebp - 0x28]
push esi
push eax
mov byte [ebp - 4], 3
mov dword [ebp - 0x184], 0
call fcn.005202d0
add esp, 8
cmp dword [eax + 0x14], 7
jbe 0x52211b
mov eax, dword [eax]
lea ecx, [ebp - 0x184]
push ecx
lea ecx, [ebp - 0x1b4]
push ecx
push 0
push eax
call dword [sym.imp.WS2_32.dll_GetAddrInfoW]
lea ecx, [ebp - 0x28]
mov dword [ebp - 0x168], eax
call fcn.00403120
mov eax, dword [ebp - 0x168]
test eax, eax
je 0x522293
push eax
call dword [sym.imp.WS2_32.dll_WSASetLastError]
mov eax, dword [ebp - 0x168]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.00505220
push eax
lea eax, [ebp - 0x28]
mov byte [ebp - 4], 4
push str.Failed_to_resolve_own_hostname._Error:
push eax
call fcn.00509e20
add esp, 0x14
push 0
push eax
mov byte [ebp - 4], 5
call fcn.00503240
mov ecx, eax
call fcn.0051ab80
lea ecx, [ebp - 0x28]
call fcn.00403120
lea ecx, [ebp - 0x40]
mov byte [ebp - 4], 3
call fcn.00403120
push esi
mov esi, dword [ebp - 0x170]
push esi
call fcn.005202d0
mov ecx, dword [ebp - 0x160]
add esp, 8
test ecx, ecx
je 0x52232e
sub edi, ecx
mov eax, ecx
cmp edi, 0x1000
jb 0x5221e0
mov ecx, dword [eax - 4]
add edi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x52236a
push edi
push ecx
call fcn.0054b2c7
add esp, 8
jmp 0x52232e
mov eax, dword [ebp - 0x174]
push eax
lea eax, [ebp - 0x28]
push eax
call fcn.00505220
push eax
lea eax, [ebp - 0x40]
mov byte [ebp - 4], 1
push str.Failed_to_get_own_hostname._Error:
push eax
call fcn.00509e20
add esp, 0x14
push 0
push eax
mov byte [ebp - 4], 2
call fcn.00503240
mov ecx, eax
call fcn.0051ab80
lea ecx, [ebp - 0x40]
call fcn.00403120
lea ecx, [ebp - 0x28]
mov byte [ebp - 4], 0
call fcn.00403120
mov esi, dword [ebp - 0x170]
push 0x5a9ca4
push esi
call fcn.005202d0
mov eax, dword [ebp - 0x180]
add esp, 8
test eax, eax
je 0x52232e
mov edi, dword [ebp - 0x16c]
sub edi, eax
cmp edi, 0x1000
jb 0x522284
mov ecx, dword [eax - 4]
add edi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x52236a
mov eax, ecx
push edi
push eax
call fcn.0054b2c7
add esp, 8
jmp 0x52232e
mov esi, dword [ebp - 0x184]
xorps xmm0, xmm0
mov edx, dword [ebp - 0x170]
mov dword [ebp - 0x17c], esi
mov eax, dword [esi + 0x14]
mov ecx, eax
mov dword [ebp - 0x178], eax
movups xmmword [edx], xmm0
mov dword [edx + 0x10], 0
lea eax, [ecx + 2]
mov dword [edx + 0x14], 0
mov dword [ebp - 0x168], eax
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x5222d0
sub ecx, dword [ebp - 0x168]
sar ecx, 1
push ecx
push dword [ebp - 0x178]
mov ecx, edx
call fcn.004530d0
push esi
call dword [sym.imp.WS2_32.dll_FreeAddrInfoW]
mov ecx, dword [ebp - 0x160]
test ecx, ecx
je 0x522328
sub edi, ecx
mov eax, ecx
cmp edi, 0x1000
jb 0x52231e
mov ecx, dword [eax - 4]
add edi, 0x23
sub eax, ecx
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x52236a
push edi
push ecx
call fcn.0054b2c7
add esp, 8
mov esi, dword [ebp - 0x170]
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0054b289
mov esp, ebp
pop ebp
ret
mov esi, dword [ebp - 0x170]
push edx
push esi
call fcn.005202d0
mov eax, dword [ebp - 0x174]
add esp, 8
test eax, eax
je 0x52232e
jmp 0x522264
call fcn.0055fb01
int3