Function at 0x4c4810
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x2c4
mov eax, dword [0x50b140]
xor eax, esp
mov dword [esp + 0x2c0], eax
mov eax, dword [esp + 0x2cc]
push ebx
push esi
push edi
mov edi, dword [esp + 0x2d4]
mov dword [esp + 0x28], edi
mov dword [esp + 0x2c], eax
mov ebx, dword [edi]
lea esi, [ebx + 0x154]
mov dword [eax], 0
cmp dword [esi], 0
mov dword [esp + 0x14], ebx
jne 0x4c4897
cmp dword [ebx + 0x368], 0
jne 0x4c4897
push dword [edi + 0x704]
push str.Could_not_DOH_resolve:__s
push ebx
call fcn.00499ce0
add esp, 0xc
xor eax, eax
cmp byte [edi + 0x50d], al
sete al
pop edi
pop esi
add eax, 5
pop ebx
mov ecx, dword [esp + 0x2c0]
xor ecx, esp
call fcn.004cfc1f
add esp, 0x2c4
ret
cmp dword [ebx + 0x57c], 0
jne 0x4c4d02
mov edi, 2
nop dword [eax]
push dword [esi]
push dword [ebx + 0x78]
call fcn.0048c050
push esi
call fcn.00495690
add esp, 0xc
add esi, 0x214
sub edi, 1
jne 0x4c48b0
push ebp
push 0x218
lea eax, [esp + 0x3c]
push edi
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [esp + 0x34], bind
xor ebp, ebp
lea esi, [ebx + 0x360]
lea eax, [esp + 0x34]
push eax
push dword [esi - 0x208]
push dword [esi + 4]
push dword [esi]
call fcn.004c4db0
push dword [esi]
mov edi, eax
mov dword [esp + ebp*4 + 0x34], edi
call dword [0x50b0e0]
add esp, 0x14
mov dword [esi], 0
test edi, edi
je 0x4c495f
cmp edi, 0xc
ja 0x4c4930
mov ecx, dword [edi*4 + 0x4ffd04]
jmp 0x4c4935
mov ecx, str.bad_error_code
push dword [ebx + 0x580]
cmp dword [esi - 0x208], 1
mov edx, str.AAAA
mov eax, 0x4ffeb8
cmovne eax, edx
push eax
push ecx
push str.DOH:__s_type__s_for__s_n
push ebx
call fcn.00499dc0
add esp, 0x14
inc ebp
add esi, 0x214
cmp ebp, 2
jl 0x4c48f2
cmp dword [esp + 0x20], 0
mov edi, 6
mov ebp, dword [esp + 0x21c]
je 0x4c4989
cmp dword [esp + 0x24], 0
jne 0x4c4c71
push dword [ebx + 0x580]
push str.DOH_Host_name:__s_n
push ebx
call fcn.00499dc0
push dword [esp + 0x40]
push str.TTL:__u_seconds_n
push ebx
call fcn.00499dc0
mov eax, dword [esp + 0x50]
add esp, 0x18
test eax, eax
jle 0x4c4ab5
lea ebp, [esp + 0x42]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], ebp
mov esi, eax
mov eax, dword [ebp - 6]
cmp eax, 1
jne 0x4c49f5
movzx eax, byte [ebp + 1]
push eax
movzx eax, byte [ebp]
push eax
movzx eax, byte [ebp - 1]
push eax
movzx eax, byte [ebp - 2]
push eax
push str.DOH_A:__u._u._u._u_n
push ebx
call fcn.00499dc0
add esp, 0x18
jmp 0x4c4a9a
cmp eax, 0x1c
jne 0x4c4a9a
push str.DOH_AAAA:
lea eax, [esp + 0x254]
push 0x80
push eax
call fcn.0049cdf0
mov ebx, dword [esp + 0x1c]
lea edi, [esp + 0x266]
add esp, 0xc
xor esi, esi
mov ebp, 0x76
add ebx, 0xfffffffe
nop dword [eax]
movzx eax, byte [ebx + 1]
test esi, esi
push eax
movzx eax, byte [ebx]
mov ecx, 0x501c2b
push eax
mov eax, 0x4f7e8c
cmove eax, ecx
push eax
push str._s_02x_02x
push ebp
push edi
call fcn.0049cdf0
mov eax, edi
add esp, 0x18
lea edx, [eax + 1]
nop dword [eax]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x4c4a60
sub eax, edx
add esi, 2
sub ebp, eax
add edi, eax
add ebx, 2
cmp esi, 0x10
jl 0x4c4a30
mov ebx, dword [esp + 0x18]
lea eax, [esp + 0x250]
push eax
push 0x4f7bfc
push ebx
call fcn.00499dc0
mov ebp, dword [esp + 0x1c]
add esp, 0xc
mov esi, dword [esp + 0x14]
add ebp, 0x14
sub esi, 1
mov dword [esp + 0x10], ebp
mov dword [esp + 0x14], esi
jne 0x4c49c6
mov ebp, dword [esp + 0x21c]
test ebp, ebp
jle 0x4c4ada
lea esi, [esp + 0x224]
mov edi, ebp
push dword [esi]
push str.CNAME:__s_n
push ebx
call fcn.00499dc0
add esp, 0xc
lea esi, [esi + 0xc]
sub edi, 1
jne 0x4c4ac2
mov eax, dword [ebx + 0x584]
xor esi, esi
mov dword [esp + 0x1c], eax
xor ebp, ebp
mov eax, dword [ebx + 0x580]
mov dword [esp + 0x28], eax
mov dword [esp + 0x18], esi
cmp dword [esp + 0x38], esi
jle 0x4c4cd6
lea eax, [esp + 0x40]
mov dword [esp + 0x10], eax
lea edx, [esi + 2]
lea edi, [esi + 0x10]
nop
mov ecx, dword [eax - 4]
mov eax, 0x17
cmp ecx, 0x1c
push 0x20
cmovne eax, edx
movzx eax, ax
mov dword [esp + 0x24], eax
mov eax, 0x1c
cmovne eax, edi
push 1
mov dword [esp + 0x1c], eax
call dword [0x50b0ec]
mov edi, eax
add esp, 8
test edi, edi
je 0x4c4ccd
push dword [esp + 0x28]
call dword [0x50b0e8]
add esp, 4
mov dword [edi + 0x14], eax
test eax, eax
je 0x4c4cc3
push dword [esp + 0x14]
push 1
call dword [0x50b0ec]
add esp, 8
mov dword [edi + 0x18], eax
test eax, eax
je 0x4c4cae
test ebp, ebp
cmove ebp, edi
test esi, esi
je 0x4c4b86
mov dword [esi + 0x1c], edi
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x14]
movzx eax, dx
mov dword [edi + 4], eax
mov dword [edi + 8], 1
mov dword [edi + 0x10], ecx
sub eax, 2
je 0x4c4bb8
sub eax, 0x15
jne 0x4c4bd5
mov eax, dword [esp + 0x10]
mov esi, dword [edi + 0x18]
movups xmm0, xmmword [eax]
movups xmmword [esi + 8], xmm0
jmp 0x4c4bc4
mov eax, dword [esp + 0x10]
mov esi, dword [edi + 0x18]
mov eax, dword [eax]
mov dword [esi + 4], eax
push dword [esp + 0x1c]
mov word [esi], dx
call dword [sym.imp.WS2_32.dll_htons]
mov word [esi + 2], ax
mov ecx, dword [esp + 0x18]
mov edx, 2
mov eax, dword [esp + 0x10]
inc ecx
add eax, 0x14
mov dword [esp + 0x18], ecx
mov esi, edi
mov dword [esp + 0x10], eax
lea edi, [edx + 0xe]
cmp ecx, dword [esp + 0x38]
jl 0x4c4b10
test ebp, ebp
je 0x4c4cd6
cmp dword [ebx + 0x80], 0
je 0x4c4c1a
push edx
push 3
push ebx
call fcn.0049e850
add esp, 0xc
push dword [ebx + 0x584]
push dword [ebx + 0x580]
push ebp
push ebx
call fcn.004a1e10
add esp, 0x10
mov esi, eax
cmp dword [ebx + 0x80], 0
je 0x4c4c46
push 3
push ebx
call fcn.0049e890
add esp, 8
test esi, esi
jne 0x4c4c58
push ebp
call fcn.004abc60
add esp, 4
lea edi, [esi + 6]
jmp 0x4c4c6a
mov eax, dword [esp + 0x2c]
xor edi, edi
mov dword [eax + 0x70c], esi
mov eax, dword [esp + 0x30]
mov dword [eax], esi
mov ebp, dword [esp + 0x21c]
test ebp, ebp
jle 0x4c4c93
lea esi, [esp + 0x224]
nop dword [eax]
push dword [esi]
call dword [0x50b0e0]
add esp, 4
lea esi, [esi + 0xc]
sub ebp, 1
jne 0x4c4c80
mov eax, edi
pop ebp
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x2c0]
xor ecx, esp
call fcn.004cfc1f
add esp, 0x2c4
ret
push dword [edi + 0x14]
call dword [0x50b0e0]
push edi
call dword [0x50b0e0]
add esp, 8
jmp 0x4c4ccd
push edi
call dword [0x50b0e0]
add esp, 4
push ebp
call fcn.004abc60
add esp, 4
mov edi, dword [esp + 0x21c]
test edi, edi
jle 0x4c4cfb
lea esi, [esp + 0x224]
push dword [esi]
call dword [0x50b0e0]
add esp, 4
lea esi, [esi + 0xc]
sub edi, 1
jne 0x4c4ce8
mov eax, 0x1b
jmp 0x4c4c95
mov ecx, dword [esp + 0x2cc]
xor eax, eax
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004cfc1f
add esp, 0x2c4
ret