Function at 0x545810
Capabilities:
Resolve dns

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x68
call fcn.004c03f0
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x5c], eax
cmp dword [ebp - 0x5c], 0
je 0x54583e
cmp dword [ebp - 0x5c], 2
je 0x54583e
cmp dword [ebp - 0x5c], 0x17
je 0x54583e
jmp 0x545840
jmp 0x545865
push 0x293
push str.crypto_bio_b_addr.c
push 0x83
push 0x8f
push 0x20
call fcn.004e9ee0
add esp, 0x14
xor eax, eax
jmp 0x545c4d
call fcn.00549f50
cmp eax, 1
je 0x545876
xor eax, eax
jmp 0x545c4d
mov ecx, 1
test ecx, ecx
je 0x545933
mov dword [ebp - 8], 0
push 0x20
push 0
lea edx, [ebp - 0x28]
push edx
call fcn.004bee40
add esp, 0xc
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x24], eax
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x20], ecx
mov edx, dword [ebp + 0x1c]
mov dword [ebp - 0x1c], edx
cmp dword [ebp + 0x14], 0
jne 0x5458bd
mov eax, dword [ebp - 0x28]
or eax, 0x400
mov dword [ebp - 0x28], eax
cmp dword [ebp + 0x10], 1
jne 0x5458cc
mov ecx, dword [ebp - 0x28]
or ecx, 1
mov dword [ebp - 0x28], ecx
mov edx, dword [ebp + 0x20]
push edx
lea eax, [ebp - 0x28]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WS2_32.dll_getaddrinfo]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x60], eax
cmp dword [ebp - 0x60], 0
je 0x5458f3
jmp 0x5458fc
mov dword [ebp - 4], 1
jmp 0x54592e
push 0x2c6
push str.crypto_bio_b_addr.c
push 2
push 0x8f
push 0x20
call fcn.004e9ee0
add esp, 0x14
mov ecx, dword [ebp - 8]
push ecx
call fcn.005452f0
add esp, 4
push eax
push 1
call fcn.004eaf40
add esp, 8
jmp 0x545c4a
mov dword [ebp - 0x38], 0
mov dword [ebp - 0x34], 0
xor edx, edx
mov word [ebp - 0x30], dx
mov dword [ebp - 0x2c], 0
push 0x545d70
push 0x6f8eb8
call fcn.005103d0
add esp, 8
neg eax
sbb eax, eax
and eax, dword [0x6f8ebc]
jne 0x545993
push 0x2f0
push str.crypto_bio_b_addr.c
push 0x41
push 0x8f
push 0x20
call fcn.004e9ee0
add esp, 0x14
mov dword [ebp - 4], 0
jmp 0x545c3c
mov eax, dword [0x6fd744]
push eax
call fcn.00510360
add esp, 4
mov dword [0x6f8eb4], 0
cmp dword [ebp + 8], 0
jne 0x545a0d
mov dword [ebp - 0x40], 0x6aee00
mov ecx, dword [ebp + 0x10]
mov dword [ebp - 0x64], ecx
cmp dword [ebp - 0x64], 0
je 0x5459cc
cmp dword [ebp - 0x64], 1
je 0x5459d8
jmp 0x5459e4
mov dword [0x6f8eb4], 0x7f000001
jmp 0x545a0b
mov dword [0x6f8eb4], 0
jmp 0x545a0b
push 0x303
push str.crypto_bio_b_addr.c
push 0x44
push 0x8f
push 0x20
call fcn.004e9ee0
add esp, 0x14
mov dword [ebp - 4], 0
jmp 0x545c3c
jmp 0x545a49
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.WSOCK32.dll_gethostbyname]
mov dword [ebp - 0x40], eax
cmp dword [ebp - 0x40], 0
jne 0x545a49
push 0x31e
push str.crypto_bio_b_addr.c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push 0x11
push 2
call fcn.004e9ee0
add esp, 0x14
mov dword [ebp - 4], 0
jmp 0x545c3c
cmp dword [ebp + 0xc], 0
jne 0x545a67
xor eax, eax
mov word [ebp - 0x30], ax
mov dword [ebp - 0x2c], 0
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x3c], ecx
jmp 0x545b52
mov dword [ebp - 0x4c], 0
push 0xa
lea edx, [ebp - 0x4c]
push edx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004bf9e5
add esp, 0xc
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], 0
mov ecx, dword [ebp + 0x18]
mov dword [ebp - 0x68], ecx
cmp dword [ebp - 0x68], 1
je 0x545a9e
cmp dword [ebp - 0x68], 2
je 0x545aa7
jmp 0x545aae
mov dword [ebp - 0x44], 0x6aee28
jmp 0x545aae
mov dword [ebp - 0x44], 0x6aee24
mov edx, dword [ebp - 0x4c]
cmp edx, dword [ebp + 0xc]
je 0x545aec
mov eax, dword [ebp - 0x4c]
movsx ecx, byte [eax]
test ecx, ecx
jne 0x545aec
cmp dword [ebp - 0x48], 0
jle 0x545aec
cmp dword [ebp - 0x48], 0x10000
jge 0x545aec
movzx edx, word [ebp - 0x48]
push edx
call dword [sym.imp.WSOCK32.dll_htons]
mov word [ebp - 0x30], ax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x2c], eax
lea ecx, [ebp - 0x38]
mov dword [ebp - 0x3c], ecx
jmp 0x545b52
mov edx, dword [ebp - 0x4c]
cmp edx, dword [ebp + 0xc]
jne 0x545b2f
mov eax, dword [ebp - 0x44]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call dword [sym.imp.WSOCK32.dll_getservbyname]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x545b2d
push 0x34f
push str.crypto_bio_b_addr.c
call dword [sym.imp.WSOCK32.dll_WSAGetLastError]
push eax
push 3
push 2
call fcn.004e9ee0
add esp, 0x14
jmp 0x545c3c
jmp 0x545b52
push 0x354
push str.crypto_bio_b_addr.c
push 0x82
push 0x8f
push 0x20
call fcn.004e9ee0
add esp, 0x14
jmp 0x545c3c
mov edx, dword [ebp + 0x20]
mov dword [edx], 0
mov dword [ebp - 0x58], 0
mov eax, dword [ebp - 0x40]
mov ecx, dword [eax + 0xc]
mov dword [ebp - 0x50], ecx
jmp 0x545b76
mov edx, dword [ebp - 0x50]
add edx, 4
mov dword [ebp - 0x50], edx
mov eax, dword [ebp - 0x50]
cmp dword [eax], 0
je 0x545b80
jmp 0x545b6d
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x50]
sub edx, dword [ecx + 0xc]
sar edx, 2
mov dword [ebp - 0x54], edx
mov eax, dword [ebp - 0x50]
sub eax, 4
mov dword [ebp - 0x50], eax
mov ecx, dword [ebp - 0x54]
mov edx, dword [ebp - 0x54]
sub edx, 1
mov dword [ebp - 0x54], edx
test ecx, ecx
jbe 0x545c35
lea eax, [ebp - 0x58]
push eax
mov ecx, dword [ebp - 0x3c]
movzx edx, word [ecx + 8]
push edx
mov eax, dword [ebp - 0x40]
movsx ecx, word [eax + 0xa]
push ecx
mov edx, dword [ebp - 0x50]
mov eax, dword [edx]
push eax
mov ecx, dword [ebp + 0x18]
push ecx
mov edx, dword [ebp - 0x40]
movsx eax, word [edx + 8]
push eax
call fcn.00545c60
add esp, 0x18
test eax, eax
jne 0x545be0
jmp 0x545bf5
mov ecx, dword [ebp - 0x58]
mov edx, dword [ebp + 0x20]
mov eax, dword [edx]
mov dword [ecx + 0x1c], eax
mov ecx, dword [ebp + 0x20]
mov edx, dword [ebp - 0x58]
mov dword [ecx], edx
jmp 0x545b8f
mov eax, dword [ebp + 0x20]
mov ecx, dword [eax]
push ecx
call fcn.005454e0
add esp, 4
mov edx, dword [ebp + 0x20]
mov dword [edx], 0
push 0x37e
push str.crypto_bio_b_addr.c
push 0x41
push 0x8f
push 0x20
call fcn.004e9ee0
add esp, 0x14
mov dword [ebp - 4], 0
jmp 0x545c3c
mov dword [ebp - 4], 1
mov eax, dword [0x6fd744]
push eax
call fcn.00510380
add esp, 4
mov eax, dword [ebp - 4]
mov esp, ebp
pop ebp
ret