Function at 0x5821f0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x44
mov dword [ebp - 0x44], ecx
mov eax, dword [ebp + 0x24]
mov byte [eax], 0
mov ecx, dword [ebp + 0x28]
mov byte [ecx], 0
mov ecx, dword [ebp + 0x1c]
call fcn.004d17f0
mov edx, dword [ebp + 0x20]
mov dword [edx], 0
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x44]
add ecx, 0x28
call fcn.004d52c0
push 0x674be7
push str.http:__
mov ecx, dword [ebp - 0x44]
add ecx, 0x28
call fcn.004d4360
push 0x674bf9
push str.https:__
mov ecx, dword [ebp - 0x44]
add ecx, 0x28
call fcn.004d4360
push 0x2f
mov ecx, dword [ebp - 0x44]
add ecx, 0x28
call fcn.004d14c0
push 0x3a
mov ecx, dword [ebp - 0x44]
add ecx, 0x28
call fcn.004d14c0
mov ecx, dword [ebp - 0x44]
add ecx, 0x28
call fcn.004d1130
mov ecx, dword [ebp - 0x44]
add ecx, 0x28
call fcn.004d0ca0
test eax, eax
jne 0x5822b2
push str.Invalid_hostname_for_resolving_hostname_to_IP_address.
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x14]
mov eax, dword [edx + 0x14]
call eax
mov ecx, dword [ebp + 8]
push ecx
push str.hostname
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x14]
mov edx, dword [eax + 0x2c]
call edx
xor al, al
jmp 0x5825a4
mov ecx, dword [ebp - 0x44]
add ecx, 0x28
call fcn.004aeda0
mov dword [ebp - 0x14], eax
cmp dword [ebp + 0x18], 0
je 0x5822d7
mov eax, dword [ebp - 0x14]
push eax
push str.HostnameResolve
mov ecx, dword [ebp + 0x18]
call fcn.0050e690
mov ecx, dword [ebp - 0x14]
push ecx
push str.dnsCacheLookup
mov edx, dword [ebp + 0x14]
mov eax, dword [edx]
mov ecx, dword [ebp + 0x14]
mov edx, dword [eax + 0x2c]
call edx
mov eax, dword [ebp + 0x1c]
push eax
mov ecx, dword [ebp - 0x14]
push ecx
call fcn.00581c00
add esp, 8
mov byte [ebp - 0xd], al
movzx edx, byte [ebp - 0xd]
test edx, edx
je 0x5823b2
mov ecx, dword [ebp + 0x1c]
call fcn.004d0ca0
test eax, eax
je 0x5823b2
lea eax, [ebp - 0x24]
push eax
lea ecx, [ebp - 0x28]
push ecx
lea edx, [ebp - 0x2c]
push edx
lea eax, [ebp - 0x20]
push eax
push 0x674d80
mov ecx, dword [ebp + 0x1c]
call fcn.004aeda0
push eax
call sub.MSVCR90.dll_sscanf
add esp, 0x18
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 4
jne 0x5823b2
mov ecx, dword [ebp + 0x20]
mov dword [ebp - 0x30], ecx
mov edx, dword [ebp - 0x30]
mov al, byte [ebp - 0x20]
mov byte [edx], al
mov ecx, dword [ebp - 0x30]
mov dl, byte [ebp - 0x2c]
mov byte [ecx + 1], dl
mov eax, dword [ebp - 0x30]
mov cl, byte [ebp - 0x28]
mov byte [eax + 2], cl
mov edx, dword [ebp - 0x30]
mov al, byte [ebp - 0x24]
mov byte [edx + 3], al
cmp dword [ebp + 0x18], 0
je 0x582390
mov ecx, dword [ebp + 0x1c]
call fcn.004aeda0
push eax
push 0x674d8c
mov ecx, dword [ebp + 0x18]
call fcn.0050e690
mov ecx, dword [ebp + 0x1c]
call fcn.004aeda0
push eax
push str.dnsCacheHit
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x14]
mov eax, dword [edx + 0x2c]
call eax
mov al, 1
jmp 0x5825a4
mov ecx, dword [ebp - 0x44]
mov edx, dword [ebp + 0x18]
mov dword [ecx + 0x9c], edx
mov eax, dword [ebp - 0x44]
mov byte [eax + 0x114], 1
mov ecx, dword [ebp - 0x44]
call fcn.004e97f0
call fcn.00504690
mov dword [ebp - 4], eax
lea ecx, [ebp - 0x34]
push ecx
push 0
mov edx, dword [ebp - 0x44]
push edx
push 0x5825b0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
je 0x582404
mov eax, dword [ebp - 0x38]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp - 0x38], 0
setne cl
mov byte [ebp - 0x15], cl
movzx edx, byte [ebp - 0x15]
test edx, edx
jne 0x58242f
push str.Failed_to_start_background_thread_for_resolving_IPV4_domain_name.
mov eax, dword [ebp + 0x14]
mov edx, dword [eax]
mov ecx, dword [ebp + 0x14]
mov eax, dword [edx + 0x14]
call eax
xor al, al
jmp 0x5825a4
push str.Resolving_domain_name__IPV4_
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x14]
mov eax, dword [edx + 0x18]
call eax
mov dword [ebp - 0xc], 0
mov dword [ebp - 8], 0
mov ecx, dword [ebp - 0x44]
movzx edx, byte [ecx + 0x114]
test edx, edx
je 0x58251d
mov eax, dword [ebp - 8]
add eax, 1
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0xc8
jle 0x582488
push 0xa
call fcn.00504680
add esp, 4
mov ecx, dword [ebp - 0xc]
add ecx, 0xa
mov dword [ebp - 0xc], ecx
jmp 0x58249b
push 2
call fcn.00504680
add esp, 4
mov edx, dword [ebp - 0xc]
add edx, 2
mov dword [ebp - 0xc], edx
cmp dword [ebp + 0x18], 0
je 0x5824e4
mov eax, dword [ebp + 0x18]
mov ecx, dword [ebp - 0xc]
cmp ecx, dword [eax + 0x88]
jb 0x5824e4
mov dword [ebp - 0xc], 0
mov ecx, dword [ebp + 0x18]
call fcn.0050e810
movzx edx, al
test edx, edx
je 0x5824e4
mov eax, dword [ebp + 0x24]
mov byte [eax], 1
push str.DNS_lookup_aborted_by_application_callback
mov ecx, dword [ebp + 0x14]
mov edx, dword [ecx]
mov ecx, dword [ebp + 0x14]
mov eax, dword [edx + 0x14]
call eax
xor al, al
jmp 0x5825a4
cmp dword [ebp + 0x10], 0
je 0x582518
call fcn.00504690
mov dword [ebp - 0x3c], eax
mov ecx, dword [ebp - 0x3c]
cmp ecx, dword [ebp - 4]
jbe 0x582518
mov edx, dword [ebp - 0x3c]
sub edx, dword [ebp - 4]
mov dword [ebp - 0x40], edx
mov eax, dword [ebp - 0x40]
cmp eax, dword [ebp + 0x10]
jbe 0x582518
mov ecx, dword [ebp + 0x28]
mov byte [ecx], 1
xor al, al
jmp 0x5825a4
jmp 0x58244f
mov edx, dword [ebp - 0x44]
add edx, 0xa0
push edx
mov ecx, dword [ebp + 0x1c]
call fcn.004d5530
mov eax, dword [ebp + 0x20]
mov ecx, dword [ebp - 0x44]
mov edx, dword [ecx + 0x118]
mov dword [eax], edx
mov ecx, dword [ebp + 0x1c]
call fcn.004d0ca0
test eax, eax
je 0x58255e
mov ecx, dword [ebp + 0x1c]
call fcn.004aeda0
push eax
mov eax, dword [ebp - 0x14]
push eax
call fcn.00553f70
add esp, 8
cmp dword [ebp + 0x18], 0
je 0x582586
mov ecx, dword [ebp + 0x1c]
call fcn.004d0ca0
test eax, eax
je 0x582586
mov ecx, dword [ebp + 0x1c]
call fcn.004aeda0
push eax
push str.ResolvedToIp
mov ecx, dword [ebp + 0x18]
call fcn.0050e690
mov ecx, dword [ebp + 0x1c]
push ecx
push str.resolvedToIp
mov ecx, dword [ebp + 0x14]
call fcn.00505490
mov ecx, dword [ebp + 0x1c]
call fcn.004d0ca0
test eax, eax
setne al
mov esp, ebp
pop ebp
ret 0x24