Function at 0x540770
Capabilities:
Create thread
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x11c
mov eax, dword [0x6e56f4]
xor eax, ebp
mov dword [ebp - 0x2c], eax
mov dword [ebp - 0x11c], ecx
mov eax, dword [ebp + 0x28]
mov byte [eax], 0
mov ecx, dword [ebp + 0x2c]
mov byte [ecx], 0
mov ecx, dword [ebp + 0x20]
call fcn.004399b0
mov edx, dword [ebp + 0x24]
mov dword [edx], 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x11c]
add ecx, 8
call fcn.0043e600
push 0x675a16
push str.http:__
mov ecx, dword [ebp - 0x11c]
add ecx, 8
call fcn.0043c810
push 0x675a17
push str.https:__
mov ecx, dword [ebp - 0x11c]
add ecx, 8
call fcn.0043c810
push 0x2f
mov ecx, dword [ebp - 0x11c]
add ecx, 8
call fcn.004395a0
push 0x3a
mov ecx, dword [ebp - 0x11c]
add ecx, 8
call fcn.004395a0
mov ecx, dword [ebp - 0x11c]
add ecx, 8
call fcn.00439380
mov ecx, dword [ebp - 0x11c]
add ecx, 8
call fcn.00504940
test eax, eax
jne 0x540857
push str.Invalid_hostname_for_resolving_hostname_to_IP_address.
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp + 8]
push ecx
push str.hostname
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x2c]
call edx
xor al, al
jmp 0x540c4c
mov ecx, dword [ebp - 0x11c]
add ecx, 8
call fcn.00504920
mov dword [ebp - 0x18], eax
cmp dword [ebp + 0x1c], 0
je 0x54087f
mov eax, dword [ebp - 0x18]
push eax
push str.HostnameResolve
mov ecx, dword [ebp + 0x1c]
call fcn.0046cef0
cmp dword [ebp + 0x14], 0
je 0x54088f
cmp dword [ebp + 0x1c], 0
jne 0x540951
push str.Resolving_domain_name__IPV4__via_gethostbyname
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x18]
call eax
mov ecx, dword [ebp - 0x18]
push ecx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x54094a
mov edx, dword [ebp - 0x20]
mov eax, dword [edx + 0xc]
cmp dword [eax], 0
je 0x5408d2
mov ecx, dword [ebp - 0x20]
mov edx, dword [ecx + 0xc]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x24]
mov edx, dword [eax]
mov dword [ecx], edx
mov eax, dword [ebp - 0x20]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x24], ecx
mov edx, dword [ebp - 0x24]
mov eax, dword [edx]
mov dword [ebp - 0x28], eax
mov ecx, dword [ebp - 0x28]
movzx edx, byte [ecx + 3]
push edx
mov eax, dword [ebp - 0x28]
movzx ecx, byte [eax + 2]
push ecx
mov edx, dword [ebp - 0x28]
movzx eax, byte [edx + 1]
push eax
mov ecx, dword [ebp - 0x28]
movzx edx, byte [ecx]
push edx
push 0x675bd0
lea eax, [ebp - 0xf8]
push eax
call fcn.005a44c9
add esp, 0x18
lea ecx, [ebp - 0xf8]
push ecx
mov ecx, dword [ebp + 0x20]
call fcn.0043e600
cmp dword [ebp + 0x1c], 0
je 0x540941
mov ecx, dword [ebp + 0x20]
call fcn.00504920
push eax
push 0x675bdc
mov ecx, dword [ebp + 0x1c]
call fcn.0046cef0
mov al, 1
jmp 0x540c4c
xor al, al
jmp 0x540c4c
mov edx, dword [ebp - 0x18]
push edx
push str.dnsCacheLookup
mov eax, dword [ebp + 0x18]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x2c]
call eax
mov ecx, dword [ebp + 0x20]
push ecx
mov edx, dword [ebp - 0x18]
push edx
call fcn.00540260
add esp, 8
mov byte [ebp - 0x11], al
movzx eax, byte [ebp - 0x11]
test eax, eax
je 0x540a5d
mov ecx, dword [ebp + 0x20]
call fcn.00504940
test eax, eax
je 0x540a5d
lea ecx, [ebp - 0x104]
push ecx
lea edx, [ebp - 0x108]
push edx
lea eax, [ebp - 0x10c]
push eax
lea ecx, [ebp - 0x100]
push ecx
push str._d._d._d._d
mov ecx, dword [ebp + 0x20]
call fcn.00504920
push eax
call fcn.005a44a7
add esp, 0x18
mov dword [ebp - 0xfc], eax
cmp dword [ebp - 0xfc], 4
jne 0x540a5d
mov edx, dword [ebp + 0x24]
mov dword [ebp - 0x110], edx
mov eax, dword [ebp - 0x110]
mov cl, byte [ebp - 0x100]
mov byte [eax], cl
mov edx, dword [ebp - 0x110]
mov al, byte [ebp - 0x10c]
mov byte [edx + 1], al
mov ecx, dword [ebp - 0x110]
mov dl, byte [ebp - 0x108]
mov byte [ecx + 2], dl
mov eax, dword [ebp - 0x110]
mov cl, byte [ebp - 0x104]
mov byte [eax + 3], cl
cmp dword [ebp + 0x1c], 0
je 0x540a3b
mov ecx, dword [ebp + 0x20]
call fcn.00504920
push eax
push 0x675c08
mov ecx, dword [ebp + 0x1c]
call fcn.0046cef0
mov ecx, dword [ebp + 0x20]
call fcn.00504920
push eax
push str.dnsCacheHit
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x2c]
call edx
mov al, 1
jmp 0x540c4c
mov eax, dword [ebp - 0x11c]
mov ecx, dword [ebp + 0x14]
mov dword [eax + 0x30], ecx
mov edx, dword [ebp - 0x11c]
mov eax, dword [ebp + 0x1c]
mov dword [edx + 0x34], eax
mov ecx, dword [ebp - 0x11c]
mov byte [ecx + 0x60], 1
push 0x3e9
mov ecx, dword [ebp - 0x11c]
call fcn.005410a0
call fcn.00452730
mov dword [ebp - 4], eax
lea edx, [ebp - 0x10]
push edx
push 0
mov eax, dword [ebp - 0x11c]
push eax
push 0x540c60
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x540ad5
push str.Failed_to_start_background_thread_for_resolving_IPV4_domain_name.
mov ecx, dword [ebp + 0x18]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x18]
mov eax, dword [edx + 0x14]
call eax
xor al, al
jmp 0x540c4c
mov ecx, dword [ebp - 0x1c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push str.Resolving_domain_name__IPV4_
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x18]
call edx
mov dword [ebp - 8], 0
mov dword [ebp - 0xc], 0
mov eax, dword [ebp - 0x11c]
movzx ecx, byte [eax + 0x60]
test ecx, ecx
je 0x540bd6
mov edx, dword [ebp - 0xc]
add edx, 1
mov dword [ebp - 0xc], edx
cmp dword [ebp - 0xc], 0xc8
jle 0x540b2f
push 0xa
call fcn.00452720
add esp, 4
jmp 0x540b39
push 2
call fcn.00452720
add esp, 4
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 8]
cmp ecx, dword [ebp + 0x14]
jb 0x540bd1
mov dword [ebp - 8], 0
push 0x74
mov edx, dword [ebp + 0x14]
push edx
mov ecx, dword [ebp + 0x1c]
call fcn.0046d0c0
mov ecx, dword [ebp + 0x1c]
call fcn.0046cdb0
movzx eax, al
test eax, eax
je 0x540b91
mov ecx, dword [ebp + 0x28]
mov byte [ecx], 1
push str.DNS_lookup_aborted_by_application_callback
mov edx, dword [ebp + 0x18]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x18]
mov edx, dword [eax + 0x14]
call edx
xor al, al
jmp 0x540c4c
cmp dword [ebp + 0x10], 0
je 0x540bd1
call fcn.00452730
mov dword [ebp - 0x114], eax
mov eax, dword [ebp - 0x114]
cmp eax, dword [ebp - 4]
jbe 0x540bd1
mov ecx, dword [ebp - 0x114]
sub ecx, dword [ebp - 4]
mov dword [ebp - 0x118], ecx
mov edx, dword [ebp - 0x118]
cmp edx, dword [ebp + 0x10]
jbe 0x540bd1
mov eax, dword [ebp + 0x2c]
mov byte [eax], 1
xor al, al
jmp 0x540c4c
jmp 0x540aff
mov ecx, dword [ebp - 0x11c]
add ecx, 0x38
push ecx
mov ecx, dword [ebp + 0x20]
call fcn.0043e6d0
mov edx, dword [ebp + 0x24]
mov eax, dword [ebp - 0x11c]
mov ecx, dword [eax + 0x64]
mov dword [edx], ecx
mov ecx, dword [ebp + 0x20]
call fcn.00504940
test eax, eax
je 0x540c17
mov ecx, dword [ebp + 0x20]
call fcn.00504920
push eax
mov edx, dword [ebp - 0x18]
push edx
call fcn.004bb9a0
add esp, 8
cmp dword [ebp + 0x1c], 0
je 0x540c3f
mov ecx, dword [ebp + 0x20]
call fcn.00504940
test eax, eax
je 0x540c3f
mov ecx, dword [ebp + 0x20]
call fcn.00504920
push eax
push str.ResolvedToIp
mov ecx, dword [ebp + 0x1c]
call fcn.0046cef0
mov ecx, dword [ebp + 0x20]
call fcn.00504940
test eax, eax
setne al
mov ecx, dword [ebp - 0x2c]
xor ecx, ebp
call fcn.005a3dd2
mov esp, ebp
pop ebp
ret 0x28