Function at 0x5bd310
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x78
call fcn.006f5ae0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x5bd33e
cmp dword [ebp - 0x20], 2
je 0x5bd33e
cmp dword [ebp - 0x20], 0x17
je 0x5bd33e
jmp 0x5bd340
jmp 0x5bd374
call fcn.00576670
push str.BIO_lookup_ex
push 0x29e
push 0x763d28
call fcn.005766c0
add esp, 0xc
push 0
push 0x83
push 0x20
call fcn.00576710
add esp, 0xc
xor eax, eax
jmp 0x5bd8a0
call fcn.005bcdf0
cmp eax, 1
je 0x5bd385
xor eax, eax
jmp 0x5bd8a0
mov ecx, 1
test ecx, ecx
je 0x5bd4cb
mov dword [ebp - 0x10], 0
mov dword [ebp - 0x24], 0
push 0x20
push 0
lea edx, [ebp - 0x78]
push edx
call fcn.006f7570
add esp, 0xc
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x74], eax
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x70], ecx
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0x6c], edx
cmp dword [ebp + 8], 0
je 0x5bd3d9
cmp dword [ebp + 0x14], 0
jne 0x5bd3d9
mov eax, dword [ebp - 0x78]
or eax, 0x400
mov dword [ebp - 0x78], eax
cmp dword [ebp + 0x10], 1
jne 0x5bd3e8
mov ecx, dword [ebp - 0x78]
or ecx, 1
mov dword [ebp - 0x78], ecx
mov edx, dword [ebp + 0x20]
push edx
lea eax, [ebp - 0x78]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call fcn.005bdc30
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 0
je 0x5bd446
cmp dword [ebp - 0x34], 8
je 0x5bd414
jmp 0x5bd44f
call fcn.00576670
push str.BIO_lookup_ex
push 0x2d3
push 0x763d28
call fcn.005766c0
add esp, 0xc
push 0
push 0xc0100
push 0x20
call fcn.00576710
add esp, 0xc
jmp 0x5bd4c6
mov dword [ebp - 4], 1
jmp 0x5bd4c6
mov ecx, dword [ebp - 0x78]
and ecx, 0x400
je 0x5bd47a
mov edx, dword [ebp - 0x78]
and edx, 0xfffffbff
mov dword [ebp - 0x78], edx
mov eax, dword [ebp - 0x78]
or eax, 4
mov dword [ebp - 0x78], eax
mov ecx, dword [ebp - 0x10]
mov dword [ebp - 0x24], ecx
jmp 0x5bd3e8
cmp dword [ebp - 0x24], 0
je 0x5bd488
mov edx, dword [ebp - 0x24]
mov dword [ebp - 0x38], edx
jmp 0x5bd48e
mov eax, dword [ebp - 0x10]
mov dword [ebp - 0x38], eax
call fcn.00576670
push str.BIO_lookup_ex
push 0x2e2
push 0x763d28
call fcn.005766c0
add esp, 0xc
mov ecx, dword [ebp - 0x38]
push ecx
call fcn.005bef80
add esp, 4
push eax
push 0x80002
push 0x20
call fcn.00576710
add esp, 0xc
jmp 0x5bd89d
mov dword [ebp - 0x58], 0
mov dword [ebp - 0x54], 0
xor edx, edx
mov word [ebp - 0x50], dx
mov dword [ebp - 0x4c], 0
push 0x5bef70
push 0x7f32a4
call fcn.00574670
add esp, 8
test eax, eax
je 0x5bd506
mov eax, dword [0x7f32a8]
mov dword [ebp - 0x3c], eax
jmp 0x5bd50d
mov dword [ebp - 0x3c], 0
cmp dword [ebp - 0x3c], 0
jne 0x5bd54c
call fcn.00576670
push str.BIO_lookup_ex
push 0x30c
push 0x763d28
call fcn.005766c0
add esp, 0xc
push 0
push 0xc0100
push 0x20
call fcn.00576710
add esp, 0xc
mov dword [ebp - 4], 0
jmp 0x5bd88f
mov ecx, dword [0x7f5b24]
push ecx
call fcn.00574650
add esp, 4
test eax, eax
jne 0x5bd56b
mov dword [ebp - 4], 0
jmp 0x5bd88f
mov dword [0x7f32a0], 0
cmp dword [ebp + 8], 0
jne 0x5bd60d
mov dword [ebp - 0xc], 0x763ccc
mov edx, dword [ebp + 0x10]
mov dword [ebp - 0x40], edx
cmp dword [ebp - 0x40], 0
je 0x5bd59a
cmp dword [ebp - 0x40], 1
je 0x5bd5a6
jmp 0x5bd5b2
mov dword [0x7f32a0], 0x7f000001
jmp 0x5bd60b
mov dword [0x7f32a0], 0
jmp 0x5bd60b
mov eax, str.We_forgot_to_handle_a_lookup_type_
test eax, eax
je 0x5bd5d2
push 0x321
push str.crypto_bio_bio_addr.c
push str._We_forgot_to_handle_a_lookup_type____NULL
call fcn.0070b75c
add esp, 0xc
call fcn.00576670
push str.BIO_lookup_ex
push 0x322
push 0x763d28
call fcn.005766c0
add esp, 0xc
push 0
push 0xc0103
push 0x20
call fcn.00576710
add esp, 0xc
mov dword [ebp - 4], 0
jmp 0x5bd88f
jmp 0x5bd65e
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jne 0x5bd65e
call fcn.00576670
push str.BIO_lookup_ex
push 0x33f
push 0x763d28
call fcn.005766c0
add esp, 0xc
push str.calling_gethostbyname__
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
call fcn.00576710
add esp, 0xc
mov dword [ebp - 4], 0
jmp 0x5bd88f
cmp dword [ebp + 0xc], 0
jne 0x5bd67c
xor eax, eax
mov word [ebp - 0x50], ax
mov dword [ebp - 0x4c], 0
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x1c], ecx
jmp 0x5bd78e
mov dword [ebp - 0x14], 0
push 0xa
lea edx, [ebp - 0x14]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00708e03
add esp, 0xc
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x18], 0
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x44], ecx
cmp dword [ebp - 0x44], 1
je 0x5bd6b3
cmp dword [ebp - 0x44], 2
je 0x5bd6bc
jmp 0x5bd6c3
mov dword [ebp - 0x18], 0x763ce0
jmp 0x5bd6c3
mov dword [ebp - 0x18], 0x763cdc
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp + 0xc]
je 0x5bd704
mov eax, dword [ebp - 0x14]
movsx ecx, byte [eax]
test ecx, ecx
jne 0x5bd704
cmp dword [ebp - 0x28], 0
jle 0x5bd704
cmp dword [ebp - 0x28], 0x10000
jge 0x5bd704
movzx edx, word [ebp - 0x28]
push edx
call dword [sym.imp.WS2_32.dll_htons]
mov word [ebp - 0x50], ax
mov eax, dword [ebp - 0x18]
mov dword [ebp - 0x4c], eax
lea ecx, [ebp - 0x58]
mov dword [ebp - 0x1c], ecx
jmp 0x5bd78e
mov edx, dword [ebp - 0x14]
cmp edx, dword [ebp + 0xc]
jne 0x5bd75c
mov eax, dword [ebp - 0x18]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.WS2_32.dll_getservbyname]
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x5bd75a
call fcn.00576670
push str.BIO_lookup_ex
push 0x36e
push 0x763d28
call fcn.005766c0
add esp, 0xc
push str.calling_getservbyname__
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
push 2
call fcn.00576710
add esp, 0xc
jmp 0x5bd88f
jmp 0x5bd78e
call fcn.00576670
push str.BIO_lookup_ex
push 0x373
push 0x763d28
call fcn.005766c0
add esp, 0xc
push 0
push 0x82
push 0x20
call fcn.00576710
add esp, 0xc
jmp 0x5bd88f
mov edx, dword [ebp + 0x20]
mov dword [edx], 0
mov dword [ebp - 0x30], 0
mov eax, dword [ebp - 0xc]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 8], ecx
jmp 0x5bd7b2
mov edx, dword [ebp - 8]
add edx, 4
mov dword [ebp - 8], edx
mov eax, dword [ebp - 8]
cmp dword [eax], 0
je 0x5bd7bc
jmp 0x5bd7a9
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 8]
sub edx, dword [ecx + 0xc]
sar edx, 2
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 8]
sub eax, 4
mov dword [ebp - 8], eax
mov ecx, dword [ebp - 0x2c]
mov dword [ebp - 0x48], ecx
mov edx, dword [ebp - 0x2c]
sub edx, 1
mov dword [ebp - 0x2c], edx
cmp dword [ebp - 0x48], 0
jbe 0x5bd888
lea eax, [ebp - 0x30]
push eax
mov ecx, dword [ebp - 0x1c]
movzx edx, word [ecx + 8]
push edx
mov eax, dword [ebp - 0xc]
movsx ecx, word [eax + 0xa]
push ecx
mov edx, dword [ebp - 8]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp - 0xc]
movsx eax, word [edx + 8]
push eax
call fcn.005bee10
add esp, 0x18
test eax, eax
jne 0x5bd821
jmp 0x5bd836
mov ecx, dword [ebp - 0x30]
mov edx, dword [ebp + 0x20]
mov eax, dword [edx]
mov dword [ecx + 0x1c], eax
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp - 0x30]
mov dword [ecx], edx
jmp 0x5bd7cb
mov eax, dword [ebp + 0x20]
mov ecx, dword [eax]
push ecx
call fcn.005bcfd0
add esp, 4
mov edx, dword [ebp + 0x20]
mov dword [edx], 0
call fcn.00576670
push str.BIO_lookup_ex
push 0x39d
push 0x763d28
call fcn.005766c0
add esp, 0xc
push 0
push 0xc0100
push 0x20
call fcn.00576710
add esp, 0xc
mov dword [ebp - 4], 0
jmp 0x5bd88f
mov dword [ebp - 4], 1
mov eax, dword [0x7f5b24]
push eax
call fcn.00574720
add esp, 4
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret