Function at 0x5b48c4
Capabilities:
Resolve function by parsing pe exports
Set socket configuration

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x270
call 0x5b48d8
pop eax
mov ebx, edx
mov dword [esp + 4], edx
mov dword [esp + 0x44], ecx
mov dword [esp + 0x48], eax
movzx eax, byte [edx + 0x254]
test eax, eax
je 0x5b4915
cmp eax, 3
jne 0x5b493b
lea eax, [ebx + 0x138]
mov dword [esp + 0x1c], eax
movzx eax, byte [ebx + 0x198]
mov eax, dword [eax*4 + 0x5b5a44]
add eax, dword [esp + 0x48]
jmp eax
mov eax, dword [ebx + 0x240]
mov ecx, dword [ebx + 0x244]
mov dword [ebx + 0x248], eax
mov dword [ebx + 0x24c], ecx
and dword [ebx], 0
mov dword [ebx + 0x250], eax
jmp 0x5b4bed
push 0x23
pop edx
mov ecx, str._async_fn__resumed_after_completion
push 0xa02784
jmp 0x5b4a92
call fcn.0063cd70
pop eax
ud2
mov ecx, dword [eax + 8]
cmp ecx, dword [eax + 0xc]
je 0x5b57b1
lea edx, [ecx + 0x20]
mov dword [eax + 8], edx
movsd xmm0, qword [ecx + 0x18]
movzx eax, word [ecx]
movsd qword [esp + 0x156], xmm0
cmp ax, 2
movsd xmm0, qword [ecx + 0x12]
movsd qword [esp + 0x150], xmm0
movsd xmm0, qword [ecx + 0xa]
movsd qword [esp + 0x148], xmm0
movsd xmm0, qword [ecx + 2]
movsd qword [esp + 0x140], xmm0
je 0x5b57b1
mov word [ebx + 0x10], ax
lea ecx, [ebx + 0x10]
movsd xmm0, qword [esp + 0x140]
movsd xmm1, qword [esp + 0x148]
mov dword [esp + 0x1c], ecx
movsd qword [ebx + 0x12], xmm0
movsd qword [ebx + 0x1a], xmm1
movsd xmm0, qword [esp + 0x150]
movsd qword [ebx + 0x22], xmm0
movsd xmm0, qword [esp + 0x156]
movsd qword [ebx + 0x28], xmm0
mov eax, dword [0xa70a24]
cmp eax, 1
ja 0x5b4d69
mov ecx, 0xa70708
call fcn.0040e00b
test al, al
je 0x5b4d69
mov ecx, dword [0xa70708]
movzx edx, al
call fcn.00605cf4
test al, al
je 0x5b4d69
mov ecx, dword [0xa70708]
xor eax, eax
mov edx, dword [ecx + 0x20]
lea ebx, [ecx + 0x1c]
test edx, edx
je 0x5b4cf5
mov eax, dword [ecx + 0x1c]
mov esi, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x28]
mov dword [esp + 0x164], edx
mov dword [esp + 0x168], esi
mov dword [esp + 0x16c], ecx
and dword [esp + 0x170], 0
lea esi, [esp + 0x160]
lea edi, [esp + 0x88]
mov dword [esi], eax
mov ecx, edi
mov edx, esi
push 0xa02794
call fcn.0057917a
pop eax
mov ecx, dword [esp + 0x1c]
lea eax, [esp + 0x70]
mov dword [esi], str.connecting_to
lea edx, [esp + 0x28]
mov dword [eax], ecx
xor ecx, ecx
mov dword [eax + 4], 0x445000
inc ecx
mov dword [esi + 4], ecx
and dword [esi + 0x10], 0
mov dword [esi + 8], eax
lea eax, [esp + 0x208]
mov dword [esi + 0xc], ecx
mov dword [edx], eax
mov dword [edx + 4], ecx
mov ecx, dword [0xa70708]
mov dword [eax], edi
mov dword [eax + 4], esi
mov dword [eax + 8], 0x9fd8ec
mov dword [edx + 8], ebx
call fcn.00606f01
mov ebx, dword [esp + 4]
mov eax, dword [ebx + 0x248]
cmp word [ebx + 0x10], 0
mov ecx, dword [eax + 0x10]
mov edx, dword [eax + 0x14]
mov eax, dword [eax + 0x18]
mov dword [esp + 0x18], ecx
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], eax
push 2
pop eax
push 0x17
pop esi
cmove esi, eax
mov eax, dword [ebx + 0x24c]
mov dword [esp + 8], eax
mov eax, dword [0xa70d1c]
cmp eax, 3
jne 0x5b5874
push 0x81
push 0
push 0
push 6
push 1
push esi
call sub.ws2_32.dll_WSASocketW
cmp eax, 0xffffffff
jne 0x5b4df4
call dword [sym.imp.kernel32.dll_GetLastError]
lea esi, [esp + 0x88]
mov edx, str.tcp_open_errortcp_set_nonblocking_error
mov ecx, esi
push eax
push 0
push 0xe
call fcn.004ebc87
add esp, 0xc
mov esi, dword [esi]
test esi, esi
jne 0x5b59a4
mov eax, dword [esp + 0x8c]
lea ecx, [esp + 0xc]
mov dword [ecx], 1
push ecx
push 0x8004667e
mov dword [esp + 8], eax
push eax
call dword [sym.imp.ws2_32.dll_ioctlsocket]
cmp eax, 0xffffffff
je 0x5b4f12
mov byte [esp + 0x28], 4
jmp 0x5b4f21
call dword [sym.imp.kernel32.dll_GetLastError]
and dword [esp + 0x28], 0
mov dword [esp + 0x2c], eax
lea esi, [esp + 0x88]
lea edx, [esp + 0x28]
mov ecx, esi
push 0x19
push 0x9d425a
call fcn.004ebeac
pop eax
pop ecx
mov esi, dword [esi]
test esi, esi
jne 0x5b58c3
mov eax, dword [esp + 8]
mov edi, dword [eax + 0x38]
cmp edi, 0x3b9aca00
je 0x5b515e
mov ecx, dword [eax + 0x30]
mov eax, dword [eax + 0x34]
mov edx, dword [esp]
lea esi, [esp + 0x88]
mov dword [esp + 0x3c], ecx
mov dword [esp + 0x40], eax
mov ecx, esi
push 1
push 8
call fcn.005db5a8
pop eax
pop ecx
cmp byte [esi], 4
je 0x5b4f93
mov ecx, dword [esp + 0x88]
cmp cl, 4
jne 0x5b5044
mov eax, dword [esp + 0x3c]
mov ecx, 0x3e8
mul ecx
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x40]
mov ebx, edx
mul ecx
mov esi, eax
mov ecx, edx
mov eax, edi
mov edi, 0xf4240
add esi, ebx
adc ecx, 0
xor edx, edx
xor ebx, ebx
div edi
mov dword [esp + 0x88], 1
add eax, dword [esp + 0x3c]
adc esi, 0
adc ecx, 0
setb dl
neg esi
sbb ebx, ebx
movzx edx, dl
or ebx, eax
xor eax, eax
dec eax
or edx, ecx
cmove eax, ebx
and dword [esp + 0x28], 0
mov dword [esp + 0x8c], eax
and dword [esp + 0x90], 0
push 0
push 0
lea eax, [esp + 0x30]
push eax
push 0
push 0
push 0xc
lea eax, [esp + 0xa0]
push eax
push 0x98000004
push dword [esp + 0x20]
call dword [sym.imp.ws2_32.dll_WSAIoctl]
cmp eax, 0xffffffff
je 0x5b5031
mov ebx, dword [esp + 4]
jmp 0x5b515a
call dword [sym.imp.kernel32.dll_GetLastError]
mov ebx, dword [esp + 4]
mov edx, eax
shl eax, 0x18
xor ecx, ecx
jmp 0x5b5051
mov edx, dword [esp + 0x8c]
mov eax, ecx
shrd eax, edx, 8
shr edx, 8
shld edx, eax, 8
shl eax, 8
movzx ecx, cl
or ecx, eax
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ecx
mov eax, dword [0xa70a24]
cmp eax, 3
ja 0x5b514f
mov ecx, 0xa6fce0
call fcn.0040e00b
test al, al
je 0x5b514f
mov ecx, dword [0xa6fce0]
movzx edx, al
call fcn.00605cf4
test al, al
je 0x5b514f
mov ecx, dword [0xa6fce0]
mov edx, dword [ecx + 0x20]
lea eax, [ecx + 0x1c]
mov dword [esp + 0x40], eax
xor eax, eax
test edx, edx
je 0x5b50da
mov eax, dword [ecx + 0x1c]
mov esi, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x28]
mov dword [esp + 0x8c], edx
mov dword [esp + 0x90], esi
mov dword [esp + 0x94], ecx
and dword [esp + 0x98], 0
lea esi, [esp + 0x88]
lea edi, [esp + 0x28]
mov dword [esi], eax
mov ecx, edi
mov edx, esi
push 0x9d4274
call fcn.0057917a
pop eax
lea eax, [esp + 0x20]
lea ecx, [esp + 0x68]
mov dword [esi], str.tcp_set_keepalive_error:
lea edx, [esp + 0x134]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], 0x9d2c20
mov dword [ecx], eax
xor eax, eax
mov dword [ecx + 4], fcn.005e2620
inc eax
mov dword [esi + 4], eax
and dword [esi + 0x10], 0
mov dword [esi + 8], ecx
lea ecx, [esp + 0xc]
mov dword [esi + 0xc], eax
mov dword [edx], ecx
mov ecx, dword [esp + 0x40]
mov dword [edx + 4], eax
mov dword [edx + 8], ecx
mov ecx, dword [0xa6fce0]
call fcn.00606f01
lea eax, [esp + 0x20]
push eax
call fcn.00578f41
pop eax
mov eax, dword [esp + 8]
mov ecx, dword [esp + 0x1c]
cmp word [ecx], 0
je 0x5b51ad
cmp byte [eax + 0x46], 0
je 0x5b51d9
mov ecx, eax
mov eax, dword [eax + 0x47]
lea edx, [esp + 0xa0]
mov dword [edx - 0x10], eax
movsd xmm0, qword [ecx + 0x4b]
movsd qword [edx - 0xc], xmm0
mov eax, dword [ecx + 0x53]
mov dword [edx - 4], eax
push 0x1a
pop ecx
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [edx - 0x18], 0x17
and dword [edx - 0x14], 0
mov dword [edx + 0x68], 0x1c
jmp 0x5b5235
cmp byte [eax + 0x41], 0
je 0x5b5200
mov esi, dword [eax + 0x42]
lea edx, [esp + 0x90]
push 0x1e
pop ecx
xor eax, eax
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [edx - 8], 2
mov dword [edx - 4], esi
mov dword [edx + 0x78], 0x10
jmp 0x5b5235
lea edi, [esp + 0xa0]
and dword [edi - 0x10], 0
and dword [edi - 0xc], 0
and dword [edi - 8], 0
and dword [edi - 4], 0
push 0x1a
pop ecx
xor eax, eax
rep stosd dword es:[edi], eax
push 0x1c
pop eax
mov cx, 0x17
jmp 0x5b5215
lea edi, [esp + 0x90]
push 0x1e
pop ecx
xor eax, eax
rep stosd dword es:[edi], eax
push 0x10
pop eax
mov cx, 2
mov word [esp + 0x88], cx
and word [esp + 0x8a], 0
and dword [esp + 0x8c], 0
mov dword [esp + 0x108], eax
mov edx, dword [esp]
lea esi, [esp + 0xc]
lea eax, [esp + 0x88]
mov ecx, esi
push eax
call fcn.005db57c
pop eax
cmp byte [esi], 4
je 0x5b5259
mov eax, dword [esp + 0xc]
cmp al, 4
jne 0x5b5260
mov byte [esp + 0xc], 4
jmp 0x5b526c
mov ecx, dword [esp + 0x10]
mov dword [esp + 0xc], eax
mov dword [esp + 0x10], ecx
lea edi, [esp + 0x28]
lea edx, [esp + 0xc]
mov ecx, edi
push 0x14
push str.tcp_bind_local_error
call fcn.004ebeac
pop eax
pop ecx
mov esi, dword [edi]
test esi, esi
jne 0x5b58da
mov eax, dword [esp + 8]
cmp byte [eax + 0x58], 0
je 0x5b53b3
mov edx, dword [esp]
lea esi, [esp + 0x50]
mov ecx, esi
push 1
push 4
call fcn.005db5a8
pop eax
pop ecx
cmp byte [esi], 4
je 0x5b53af
movsd xmm0, qword [esp + 0x50]
movsd qword [esp + 0x20], xmm0
mov eax, dword [0xa70a24]
cmp eax, 3
ja 0x5b53a4
mov ecx, 0xa6fcd4
call fcn.0040e00b
test al, al
je 0x5b53a4
mov ecx, dword [0xa6fcd4]
movzx edx, al
call fcn.00605cf4
test al, al
je 0x5b53a4
mov ecx, dword [0xa6fcd4]
xor eax, eax
mov edx, dword [ecx + 0x20]
lea ebx, [ecx + 0x1c]
test edx, edx
je 0x5b5333
mov eax, dword [ecx + 0x1c]
mov esi, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x28]
mov dword [esp + 0x8c], edx
mov dword [esp + 0x90], esi
mov dword [esp + 0x94], ecx
and dword [esp + 0x98], 0
lea esi, [esp + 0x88]
mov ecx, edi
mov dword [esi], eax
mov edx, esi
push 0x9d42bc
call fcn.0057917a
pop eax
lea eax, [esp + 0x20]
lea ecx, [esp + 0x68]
mov dword [esi], str.tcp_set_reuse_address_error:
lea edx, [esp + 0x134]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], 0x9d2c20
mov dword [ecx], eax
xor eax, eax
mov dword [ecx + 4], fcn.005e2620
inc eax
mov dword [esi + 4], eax
and dword [esi + 0x10], 0
mov dword [esi + 8], ecx
lea ecx, [esp + 0xc]
mov dword [esi + 0xc], eax
mov dword [edx], ecx
mov ecx, dword [0xa6fcd4]
mov dword [edx + 4], eax
mov dword [edx + 8], ebx
call fcn.00606f01
mov ebx, dword [esp + 4]
lea eax, [esp + 0x20]
push eax
call fcn.00578f41
pop eax
mov eax, dword [esp + 8]
cmp dword [eax], 0
je 0x5b54d7
mov edx, dword [esp]
lea esi, [esp + 0x50]
mov ecx, esi
push dword [eax + 4]
push 0x1001
call fcn.005db5a8
pop eax
pop ecx
cmp byte [esi], 4
je 0x5b54d3
movsd xmm0, qword [esp + 0x50]
movsd qword [esp + 0x20], xmm0
mov eax, dword [0xa70a24]
cmp eax, 3
ja 0x5b54c8
mov ecx, 0xa6fcc8
call fcn.0040e00b
test al, al
je 0x5b54c8
mov ecx, dword [0xa6fcc8]
movzx edx, al
call fcn.00605cf4
test al, al
je 0x5b54c8
mov ecx, dword [0xa6fcc8]
xor eax, eax
mov edx, dword [ecx + 0x20]
lea ebx, [ecx + 0x1c]
test edx, edx
je 0x5b5457
mov eax, dword [ecx + 0x1c]
mov esi, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x28]
mov dword [esp + 0x8c], edx
mov dword [esp + 0x90], esi
mov dword [esp + 0x94], ecx
and dword [esp + 0x98], 0
lea esi, [esp + 0x88]
mov ecx, edi
mov dword [esi], eax
mov edx, esi
push 0x9d42f4
call fcn.0057917a
pop eax
lea eax, [esp + 0x20]
lea ecx, [esp + 0x68]
mov dword [esi], str.tcp_set_buffer_size_error:
lea edx, [esp + 0x134]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], 0x9d2c20
mov dword [ecx], eax
xor eax, eax
mov dword [ecx + 4], fcn.005e2620
inc eax
mov dword [esi + 4], eax
and dword [esi + 0x10], 0
mov dword [esi + 8], ecx
lea ecx, [esp + 0xc]
mov dword [esi + 0xc], eax
mov dword [edx], ecx
mov ecx, dword [0xa6fcc8]
mov dword [edx + 4], eax
mov dword [edx + 8], ebx
call fcn.00606f01
mov ebx, dword [esp + 4]
lea eax, [esp + 0x20]
push eax
call fcn.00578f41
pop eax
mov eax, dword [esp + 8]
cmp dword [eax + 8], 0
je 0x5b55f8
mov edx, dword [esp]
lea esi, [esp + 0x50]
mov ecx, esi
push dword [eax + 0xc]
push 0x1002
call fcn.005db5a8
pop eax
pop ecx
cmp byte [esi], 4
je 0x5b55f8
movsd xmm0, qword [esp + 0x50]
movsd qword [esp + 0x20], xmm0
mov eax, dword [0xa70a24]
cmp eax, 3
ja 0x5b55ed
mov ecx, 0xa6fcbc
call fcn.0040e00b
test al, al
je 0x5b55ed
mov ecx, dword [0xa6fcbc]
movzx edx, al
call fcn.00605cf4
test al, al
je 0x5b55ed
mov ecx, dword [0xa6fcbc]
xor eax, eax
mov edx, dword [ecx + 0x20]
lea ebx, [ecx + 0x1c]
test edx, edx
je 0x5b557c
mov eax, dword [ecx + 0x1c]
mov esi, dword [ecx + 0x24]
mov ecx, dword [ecx + 0x28]
mov dword [esp + 0x8c], edx
mov dword [esp + 0x90], esi
mov dword [esp + 0x94], ecx
and dword [esp + 0x98], 0
lea esi, [esp + 0x88]
mov ecx, edi
mov dword [esi], eax
mov edx, esi
push 0x9d4328
call fcn.0057917a
pop eax
lea eax, [esp + 0x20]
lea ecx, [esp + 0x68]
mov dword [esi], str.tcp_set_recv_buffer_size_error:_8C
lea edx, [esp + 0x134]
mov dword [esp + 0xc], edi
mov dword [esp + 0x10], esi
mov dword [esp + 0x14], 0x9d2c20
mov dword [ecx], eax
xor eax, eax
mov dword [ecx + 4], fcn.005e2620
inc eax
mov dword [esi + 4], eax
and dword [esi + 0x10], 0
mov dword [esi + 8], ecx
lea ecx, [esp + 0xc]
mov dword [esi + 0xc], eax
mov dword [edx], ecx
mov ecx, dword [0xa6fcbc]
mov dword [edx + 4], eax
mov dword [edx + 8], ebx
call fcn.00606f01
mov ebx, dword [esp + 4]
lea eax, [esp + 0x20]
push eax
call fcn.00578f41
pop eax
movsd xmm0, qword [ebx + 0x24]
mov eax, dword [ebx + 0x18]
mov ecx, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
lea edi, [ebx + 0x64]
movsd qword [esp + 0x78], xmm0
movsd xmm0, qword [ebx + 0x1c]
movsd qword [esp + 0x70], xmm0
mov esi, dword [ebx + 0x2c]
mov dword [esp + 0x80], esi
mov esi, dword [esp + 0x5c]
mov dword [ebx + 0x34], esi
mov esi, dword [esp + 0x18]
mov dword [ebx + 0x30], esi
mov esi, dword [esp + 0x60]
mov dword [ebx + 0x38], esi
mov dword [ebx + 0x40], ecx
mov dword [ebx + 0x48], eax
mov dword [ebx + 0x44], edx
movsd xmm0, qword [esp + 0x70]
movsd xmm1, qword [esp + 0x78]
movsd qword [ebx + 0x4c], xmm0
movsd qword [ebx + 0x54], xmm1
mov eax, dword [esp + 0x80]
mov dword [ebx + 0x5c], eax
mov eax, dword [esp]
mov dword [ebx + 0x60], eax
push 0xa
pop ecx
lea esi, [esp + 0x208]
xor eax, eax
rep movsd dword es:[edi], dword [esi]
mov byte [ebx + 0x8c], al
lea esi, [ebx + 0x30]
movzx ecx, word [esp + 0x59]
mov word [ebx + 0x8d], cx
mov cl, byte [esp + 0x5b]
mov byte [ebx + 0x8f], cl
mov byte [ebx + 0x90], al
lea eax, [ebx + 0x91]
lea ecx, [esp + 0x160]
push 0xa7
push ecx
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
lea eax, [ebx + 0x138]
push pe_nt_image_headers32
push esi
mov dword [esp + 0x24], eax
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
movzx eax, byte [ebx + 0x198]
mov eax, dword [eax*4 + 0x5b5a44]
add eax, dword [esp + 0x48]
jmp eax
cmp dword [ebx], 0
je 0x5b593a
movsd xmm0, qword [ebx]
movsd xmm1, qword [ebx + 8]
movsd qword [esp + 0x118], xmm1
movsd qword [esp + 0x110], xmm0
jmp 0x5b596f
lea eax, [esp + 0xc]
lea edi, [esp + 0x28]
mov ecx, 0xa70d1c
xor edx, edx
mov byte [eax], 1
mov dword [edi], eax
push 0xa0a4f0
push 0xa0a478
push edi
call fcn.00642700
add esp, 0xc
jmp 0x5b4daa
mov eax, dword [esp + 0x8c]
mov edi, dword [esp + 0x90]
mov ebx, dword [esp + 0x94]
jmp 0x5b58e6
mov eax, dword [esp + 0x2c]
mov edi, dword [esp + 0x30]
mov ebx, dword [esp + 0x34]
mov dword [esp + 8], eax
push dword [esp]
call dword [sym.imp.ws2_32.dll_closesocket]
mov eax, dword [esp + 8]
mov ecx, ebx
mov ebx, dword [esp + 4]
mov dword [ebx + 0x3c], esi
mov dword [ebx + 0x40], eax
mov dword [ebx + 0x44], edi
lea edi, [ebx + 0x3c]
mov dword [ebx + 0x48], ecx
mov dword [ebx + 0x38], 0x3b9aca01
push 2
pop esi
movsd xmm0, qword [edi]
movsd xmm1, qword [edi + 8]
mov ecx, ebx
movsd qword [esp + 0x118], xmm1
movsd qword [esp + 0x110], xmm0
call fcn.005b5cac
jmp 0x5b5972
lea esi, [esp + 0x160]
push 7
pop edx
mov ecx, esi
push 0x13
push str.Network_unreachabletcp_connect_error
call fcn.0056bdc9
pop eax
pop ecx
lea ecx, [esp + 0x110]
mov edx, 0xa0282b
push dword [esi + 4]
push dword [esi]
push 0x11
call fcn.004ebc87
add esp, 0xc
push 2
pop esi
mov eax, dword [esp + 0x44]
movsd xmm0, qword [esp + 0x110]
movsd xmm1, qword [esp + 0x118]
mov dword [eax], esi
movsd qword [eax + 4], xmm0
movsd qword [eax + 0xc], xmm1
mov al, 1
mov byte [ebx + 0x254], al
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov eax, dword [esp + 0x8c]
mov edi, dword [esp + 0x90]
mov ecx, dword [esp + 0x94]
jmp 0x5b58f9