Function at 0x5107a0
Capabilities:
Receive data
Receive data on socket
Send data
Send data on socket

Disassembly:
push 0xffffffffffffffff
push 0x566148
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ebx
push ebp
push esi
push edi
xor ebx, ebx
push 0x10000
mov esi, ecx
push ebx
mov dword [esp + 0x18], ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [esi + 0x3054], eax
jne 0x510832
push str.Out_of_memory__1__n
mov ecx, esi
call fcn.004cfa50
mov eax, dword [0x5c2a74]
mov dword [esp + 0x2c], eax
mov ecx, dword [esi + 0x7c]
mov eax, dword [0x5c8094]
mov dword [esp + 0x1c], ebx
mov edx, dword [ecx]
lea ecx, [esp + 0x2c]
push edx
push eax
push ecx
call fcn.0053afda
mov edx, dword [esp + 0x38]
mov ecx, dword [esi + 0x6c]
add esp, 0xc
push edx
call fcn.004d1ef0
lea ecx, [esp + 0x2c]
mov dword [esp + 0x1c], 0xffffffff
call fcn.005421be
mov eax, 0x80090304
jmp 0x510da6
mov eax, dword [esp + 0x30]
mov edi, dword [esp + 0x24]
mov dword [esi + 0x3058], ebx
mov dword [esi + 0x305c], eax
mov dword [esi + 0x3050], 0x90312
mov eax, dword [esi + 0x3050]
cmp eax, 0x90312
je 0x51086f
cmp eax, 0x80090318
je 0x51086f
cmp eax, 0x90320
jne 0x510d6f
cmp dword [esi + 0x3058], ebx
je 0x51087e
cmp eax, 0x80090318
jne 0x5108d9
cmp dword [esi + 0x305c], ebx
je 0x5108cf
push 0x3c
push edi
mov ecx, esi
call fcn.004cff00
cmp eax, ebx
jne 0x510da6
mov eax, dword [esi + 0x3058]
mov ecx, 0x10000
sub ecx, eax
push ebx
push ecx
mov ecx, dword [esi + 0x3054]
add eax, ecx
push eax
push edi
call sub.WSOCK32.dll_recv
cmp eax, 0xffffffff
je 0x510a7b
cmp eax, ebx
je 0x510af6
add dword [esi + 0x3058], eax
jmp 0x5108d9
mov dword [esi + 0x305c], 1
mov ecx, dword [esi + 0x3058]
lea eax, [esi + 0x3010]
mov dword [esi + 0x300c], eax
lea edi, [esi + 0x3034]
mov dword [eax], ecx
mov ecx, 2
mov dword [esi + 0x3014], ecx
mov dword [esi + 0x3008], ecx
mov dword [esi + 0x3038], ecx
lea eax, [esi + 0x3004]
lea ecx, [esi + 0x3028]
mov dword [esi + 0x3024], ebx
mov dword [esi + 0x301c], ebx
mov dword [esi + 0x3020], ebx
mov dword [eax], ebx
mov dword [esi + 0x303c], ebx
mov dword [edi], ebx
mov dword [ecx], ebx
lea ebx, [esi + 0x3048]
mov edx, dword [esi + 0x3054]
lea ebp, [esi + 0x3040]
push ebx
push ebp
xor ebx, ebx
push ecx
mov ecx, dword [esp + 0x34]
push ebx
push ebx
push eax
mov eax, dword [esp + 0x44]
push 0x10
push ebx
push 0xc11c
mov dword [esi + 0x3018], edx
mov edx, dword [esi + 0x7c]
push ebx
push eax
push ecx
mov dword [esi + 0x302c], 1
mov dword [esi + 0x3030], edi
call dword [edx + 0x364]
cmp eax, ebx
mov dword [esi + 0x3050], eax
je 0x51099d
cmp eax, 0x90312
je 0x51099d
cmp eax, ebx
jge 0x5109e3
mov eax, dword [ebp]
test ah, 0x40
je 0x5109e3
mov edi, dword [edi]
cmp edi, ebx
je 0x5109e3
mov eax, dword [esi + 0x303c]
cmp eax, ebx
je 0x5109e3
push ebx
push edi
mov edi, dword [esp + 0x2c]
push eax
push edi
call sub.WSOCK32.dll_send
cmp eax, 0xffffffff
je 0x510b54
cmp eax, ebx
je 0x510b54
mov eax, dword [esi + 0x303c]
mov edx, dword [esi + 0x7c]
push eax
call dword [edx + 0x38c]
mov dword [esi + 0x303c], ebx
jmp 0x5109e7
mov edi, dword [esp + 0x24]
mov eax, dword [esi + 0x3050]
cmp eax, 0x80090318
je 0x510850
cmp eax, ebx
je 0x510be8
jl 0x510d00
cmp eax, 0x90320
jne 0x510a33
mov ecx, dword [esp + 0x2c]
mov edx, dword [esp + 0x28]
push ecx
push edx
mov ecx, esi
call fcn.005110a0
mov dword [esi + 0x305c], ebx
mov dword [esi + 0x3050], 0x90312
jmp 0x510850
cmp dword [esi + 0x3020], 5
jne 0x510a70
mov ecx, dword [esi + 0x3054]
mov eax, dword [esi + 0x301c]
mov edx, ecx
push eax
sub edx, eax
mov eax, dword [esi + 0x3058]
add edx, eax
push edx
push ecx
call fcn.00527c60
mov eax, dword [esi + 0x301c]
add esp, 0xc
mov dword [esi + 0x3058], eax
jmp 0x510850
mov dword [esi + 0x3058], ebx
jmp 0x510850
call sub.WSOCK32.dll_WSAGetLastError
mov ecx, dword [0x5c2a74]
mov dword [esp + 0x10], eax
mov dword [esp + 0x24], ecx
push eax
lea edx, [esp + 0x28]
push str.Error__d_reading_data_from_server_n
push edx
mov dword [esp + 0x28], 1
call fcn.0053afda
mov eax, dword [esp + 0x30]
add esp, 0xc
mov ecx, esi
push eax
call fcn.004cfa50
mov ecx, dword [esi + 0x7c]
mov dword [esi + 0x3050], 0x80090304
mov eax, dword [0x5c8094]
mov edx, dword [ecx]
lea ecx, [esp + 0x24]
push edx
push eax
push ecx
call fcn.0053afda
mov edx, dword [esp + 0x30]
mov ecx, dword [esi + 0x6c]
add esp, 0xc
push edx
call fcn.004d1ef0
mov dword [esp + 0x1c], 0xffffffff
lea ecx, [esp + 0x24]
jmp 0x510d6a
push str.Server_unexpectedly_disconnected_n
mov ecx, esi
call fcn.004cfa50
mov dword [esi + 0x3050], 0x80090304
mov eax, dword [0x5c2a74]
mov dword [esp + 0x24], eax
mov ecx, dword [esi + 0x7c]
mov eax, dword [0x5c8094]
mov dword [esp + 0x1c], 2
mov edx, dword [ecx]
lea ecx, [esp + 0x24]
push edx
push eax
push ecx
call fcn.0053afda
mov edx, dword [esp + 0x30]
mov ecx, dword [esi + 0x6c]
add esp, 0xc
push edx
call fcn.004d1ef0
mov dword [esp + 0x1c], 0xffffffff
lea ecx, [esp + 0x24]
jmp 0x510d6a
call sub.WSOCK32.dll_WSAGetLastError
mov edi, eax
mov eax, dword [0x5c2a74]
mov dword [esp + 0x24], eax
push edi
lea ecx, [esp + 0x28]
push str.Error__d_sending_data_to_server__2__n
push ecx
mov dword [esp + 0x28], 3
call fcn.0053afda
mov edx, dword [esp + 0x30]
add esp, 0xc
mov ecx, esi
push edx
call fcn.004cfa50
mov eax, dword [esi + 0x7c]
mov edx, dword [0x5c8094]
mov ecx, dword [eax]
lea eax, [esp + 0x24]
push ecx
push edx
push eax
call fcn.0053afda
mov ecx, dword [esp + 0x30]
add esp, 0xc
push ecx
mov ecx, dword [esi + 0x6c]
call fcn.004d1ef0
mov eax, dword [esi + 0x303c]
mov edx, dword [esi + 0x7c]
push eax
call dword [edx + 0x38c]
mov edx, dword [esp + 0x2c]
mov ecx, dword [esi + 0x7c]
push edx
call dword [ecx + 0x370]
lea ecx, [esp + 0x24]
mov dword [esp + 0x1c], 0xffffffff
call fcn.005421be
mov eax, edi
jmp 0x510da6
push str.Handshake_was_successful_n
mov ecx, esi
call fcn.004cfa50
mov eax, dword [esi + 0x3020]
mov ebp, 5
cmp eax, ebp
mov byte [esi + 0x2f64], 1
jne 0x510cf2
mov eax, dword [esi + 0x301c]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov edi, dword [esp + 0x34]
cmp eax, ebx
mov dword [edi + 8], eax
jne 0x510c87
push str.Out_of_memory__2__n
mov ecx, esi
call fcn.004cfa50
mov ecx, dword [0x5c2a74]
mov dword [esp + 0x2c], ecx
mov edx, dword [esi + 0x7c]
mov ecx, dword [0x5c8094]
mov dword [esp + 0x1c], 4
mov eax, dword [edx]
lea edx, [esp + 0x2c]
push eax
push ecx
push edx
call fcn.0053afda
mov eax, dword [esp + 0x38]
mov ecx, dword [esi + 0x6c]
add esp, 0xc
push eax
call fcn.004d1ef0
lea ecx, [esp + 0x2c]
mov dword [esp + 0x1c], 0xffffffff
call fcn.005421be
mov eax, 0x80090304
jmp 0x510da6
mov ecx, dword [esi + 0x301c]
mov edx, dword [esi + 0x3058]
push ecx
sub edx, ecx
add edx, dword [esi + 0x3054]
push edx
push eax
call fcn.00527c60
mov eax, dword [esi + 0x301c]
mov dword [edi + 4], 2
mov dword [edi], eax
mov ecx, dword [0x5c2a74]
add esp, 0xc
mov dword [esp + 0x24], ecx
mov edx, eax
lea eax, [esp + 0x24]
push edx
push str._d_bytes_of_app_data_was_bundled_with_handshake_data_n
push eax
mov dword [esp + 0x28], ebp
call fcn.0053afda
mov ecx, dword [esp + 0x30]
add esp, 0xc
push ecx
mov ecx, esi
call fcn.004cfa50
mov dword [esp + 0x1c], 0xffffffff
lea ecx, [esp + 0x24]
jmp 0x510d6a
mov eax, dword [esp + 0x34]
mov dword [eax + 8], ebx
mov dword [eax], ebx
mov dword [eax + 4], ebx
jmp 0x510d6f
mov edx, dword [0x5c2a74]
mov dword [esp + 0x28], edx
mov eax, dword [esi + 0x3050]
lea ecx, [esp + 0x28]
push eax
push str.Error_0x_x_returned_by_InitializeSecurityContext__2__n
push ecx
mov dword [esp + 0x28], 6
call fcn.0053afda
mov edx, dword [esp + 0x34]
add esp, 0xc
mov ecx, esi
push edx
call fcn.004cfa50
mov eax, dword [esi + 0x7c]
mov edx, dword [0x5c8094]
mov ecx, dword [eax]
lea eax, [esp + 0x28]
push ecx
push edx
push eax
call fcn.0053afda
mov ecx, dword [esp + 0x34]
add esp, 0xc
push ecx
mov ecx, dword [esi + 0x6c]
call fcn.004d1ef0
mov dword [esp + 0x1c], 0xffffffff
lea ecx, [esp + 0x28]
call fcn.005421be
cmp dword [esi + 0x3050], ebx
jge 0x510d85
mov eax, dword [esp + 0x2c]
mov edx, dword [esi + 0x7c]
push eax
call dword [edx + 0x370]
mov ecx, dword [esi + 0x3054]
push ecx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov esi, dword [esi + 0x3050]
cmp esi, ebx
jge 0x510da4
mov eax, dword [esp + 0x10]
cmp eax, ebx
jne 0x510da6
mov eax, esi
mov ecx, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
mov dword fs:[0], ecx
add esp, 0x10
ret 0x14