Function at 0x476ad0
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x68
mov eax, dword [0x55ca98]
xor eax, ebp
mov dword [ebp - 4], eax
cmp dword [ebp + 0x10], 1
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
push ebx
mov ebx, dword [ebp + 0x14]
push esi
mov esi, dword [ebp + 0x1c]
push edi
mov dword [ebp - 0x4c], ecx
mov dword [ebp - 0x68], eax
mov dword [ebp - 0x5c], ebx
jb 0x476ddd
test eax, eax
je 0x476ddd
test ecx, ecx
je 0x476ddd
mov dword [ebp - 0x64], 0
test ebx, ebx
je 0x476b22
mov dword [ebp - 0x58], ebx
jmp 0x476b49
cmp dword [ecx + 4], 1
mov eax, dword [ecx + 0x70]
jne 0x476b37
mov edx, 0x51f420
mov edi, 0x51f424
jmp 0x476b41
mov edx, str.https
mov edi, str.http
test eax, eax
cmove edx, edi
mov dword [ebp - 0x58], edx
test esi, esi
jne 0x476b57
mov esi, dword [ecx + 0x14]
test esi, esi
jne 0x476b57
mov esi, dword [ecx + 0x1c]
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x60], eax
test eax, eax
jg 0x476b67
mov eax, dword [ecx + 0x6c]
mov dword [ebp - 0x60], eax
mov dword [ebp - 0x50], 0x50
test esi, esi
je 0x476ddd
mov ecx, esi
lea edx, [ecx + 1]
nop dword [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x476b80
sub ecx, edx
lea eax, [ecx*2 + 1]
add eax, ecx
push eax
mov dword [ebp - 0x48], eax
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_malloc]
mov edx, eax
add esp, 4
mov dword [ebp - 0x54], edx
test edx, edx
je 0x476ddd
mov eax, dword [ebp - 0x48]
mov edi, edx
dec eax
add eax, edx
cmp byte [esi], 0
mov dword [ebp - 0x48], eax
je 0x476c29
mov ebx, eax
nop
cmp edi, ebx
jae 0x476c23
movzx eax, byte [esi]
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_isalnum]
add esp, 4
test eax, eax
jne 0x476c18
movsx eax, byte [esi]
push eax
push dword [0x55c494]
call sub.VCRUNTIME140.dll_strchr
add esp, 8
test eax, eax
jne 0x476c18
lea edx, [edi + 2]
cmp edx, ebx
jae 0x476c23
mov ecx, dword [0x55c498]
mov byte [edi], 0x25
movzx eax, byte [esi]
shr eax, 4
movzx eax, byte [eax + ecx]
mov byte [edi + 1], al
mov edi, edx
movzx eax, byte [esi]
and eax, 0xf
movzx eax, byte [eax + ecx]
mov byte [edx], al
jmp 0x476c1c
mov al, byte [esi]
mov byte [edi], al
inc esi
inc edi
cmp byte [esi], 0
jne 0x476bc0
mov ebx, dword [ebp - 0x5c]
mov edx, dword [ebp - 0x54]
xor eax, eax
mov byte [edi], 0
xor esi, esi
cmp byte [edx], al
je 0x476c83
mov eax, dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
xor ebx, ebx
mov dword [ebp - 0x48], eax
nop
push 3
lea edi, [esi + edx]
push 0x51f428
push edi
call eax
mov edx, eax
add esp, 0xc
mov cl, 0x2f
test edx, edx
je 0x476c5a
mov cl, byte [edi]
xor eax, eax
test edx, edx
mov edx, dword [ebp - 0x54]
sete al
mov byte [ebx + edx], cl
inc ebx
lea eax, [eax*2 + 1]
add esi, eax
mov eax, dword [ebp - 0x48]
cmp byte [esi + edx], 0
jne 0x476c40
mov dword [ebp - 0x48], ebx
mov ebx, dword [ebp - 0x5c]
mov eax, dword [ebp - 0x48]
mov byte [eax + edx], 0
test ebx, ebx
je 0x476d1e
mov ecx, str.https
mov eax, ebx
mov dl, byte [eax]
cmp dl, byte [ecx]
jne 0x476cb6
test dl, dl
je 0x476cb2
mov dl, byte [eax + 1]
cmp dl, byte [ecx + 1]
jne 0x476cb6
add eax, 2
add ecx, 2
test dl, dl
jne 0x476c96
xor eax, eax
jmp 0x476cbb
sbb eax, eax
or eax, 1
test eax, eax
je 0x476ced
mov eax, 0x51f420
mov cl, byte [ebx]
cmp cl, byte [eax]
jne 0x476ce4
test cl, cl
je 0x476ce0
mov cl, byte [ebx + 1]
cmp cl, byte [eax + 1]
jne 0x476ce4
add ebx, 2
add eax, 2
test cl, cl
jne 0x476cc4
xor eax, eax
jmp 0x476ce9
sbb eax, eax
or eax, 1
test eax, eax
jne 0x476cf4
mov dword [ebp - 0x50], 0x1bb
mov ebx, dword [ebp - 0x4c]
mov eax, dword [ebx + 0x4ac]
mov eax, dword [eax + 0x88]
test eax, eax
je 0x476d37
push 0x51e854
push eax
call fcn.00479650
add esp, 8
test eax, eax
jne 0x476d37
lea edi, [eax + 1]
jmp 0x476d39
mov ebx, dword [ebp - 0x4c]
mov ecx, 0x50
mov eax, 0x1bb
cmp dword [ebx + 0x70], 0
cmovne ecx, eax
mov dword [ebp - 0x50], ecx
jmp 0x476cf7
xor edi, edi
mov eax, dword [ebx + 0x4ac]
mov esi, dword [eax + 0x84]
mov eax, dword [ebp - 0x60]
cmp eax, dword [ebp - 0x50]
je 0x476d61
push eax
lea eax, [ebp - 0x14]
push 0x51f42c
push eax
call fcn.00401620
add esp, 0xc
jmp 0x476d65
mov byte [ebp - 0x14], 0
test edi, edi
je 0x476d6d
test esi, esi
jne 0x476d99
lea eax, [ebx + 0x4b8]
mov byte [ebp - 0x44], 0
test eax, eax
je 0x476d96
cmp word [eax], 2
jne 0x476d96
push 2
push 0
push 0
push 0x30
lea ecx, [ebp - 0x44]
push ecx
push 0x10
push eax
call dword [sym.imp.WS2_32.dll_getnameinfo]
lea esi, [ebp - 0x44]
mov edi, dword [ebp - 0x54]
lea eax, [ebp - 0x14]
push edi
push eax
push esi
push dword [ebp - 0x58]
lea eax, [ebp - 0x64]
push str._s:___s_s_s
push dword [ebp + 0x10]
push dword [ebp - 0x68]
push eax
push ebx
call fcn.00478b30
push edi
call dword [sym.imp.api_ms_win_crt_heap_l1_1_0.dll_free]
add esp, 0x28
cmp dword [ebp - 0x64], 0
jne 0x476ddd
pop edi
pop esi
xor eax, eax
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.005091c5
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp - 4]
or eax, 0xffffffff
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.005091c5
mov esp, ebp
pop ebp
ret