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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x5c7e10
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x10
push ebx
mov ebx, ecx
push esi
push edi
mov al, byte [ebx + 0x30d6]
mov dword [ebp - 0x10], esp
test al, al
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 4], 0
jne 0x5460ad
mov eax, dword [ebx + 0x30c0]
lea esi, [ebx + 0xb4]
push 0
push 1
push esi
push eax
call sub.WSOCK32.dll_recv
push str.recv_first_byte
push eax
mov ecx, ebx
call fcn.0050e0e0
mov ecx, eax
test ecx, ecx
je 0x546041
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [ebx + 0x30d6], 1
mov ecx, dword [0x67da2c]
mov dword [ebp - 0x14], ecx
movsx edx, byte [esi]
push edx
lea eax, [ebp - 0x14]
push str.recv_handshake__type___02X_n
push eax
mov byte [ebp - 4], 1
call fcn.00599a28
mov ecx, dword [ebp - 0x14]
add esp, 0xc
push ecx
mov ecx, ebx
call fcn.0050e040
mov edx, dword [ebx + 0x30c0]
push 0
push edx
mov ecx, ebx
call fcn.0050e590
test eax, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x14]
je 0x5460a8
call fcn.005a0c5d
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.005a0c5d
mov eax, dword [ebx + 0x30e4]
test eax, eax
jne 0x5460ca
push 0x600
call fcn.0059cff9
add esp, 4
mov dword [ebx + 0x30e4], eax
mov eax, dword [ebx + 0x30e8]
test eax, eax
jne 0x5460e7
push 0x600
call fcn.0059cff9
add esp, 4
mov dword [ebx + 0x30e8], eax
mov ecx, dword [ebx + 0x30e4]
test ecx, ecx
je 0x546387
mov eax, dword [ebx + 0x30e8]
test eax, eax
je 0x546387
mov al, byte [ebx + 0x30d7]
test al, al
jne 0x54621c
mov eax, dword [ebx + 0x30f0]
mov edx, 0x600
sub edx, eax
push 0
add eax, ecx
push edx
push eax
mov eax, dword [ebx + 0x30c0]
push eax
call sub.WSOCK32.dll_recv
mov esi, eax
push str.recv_handshake_p1
push esi
mov ecx, ebx
call fcn.0050e0e0
mov ecx, eax
test ecx, ecx
je 0x546161
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 0x30f0]
add ecx, esi
mov eax, ecx
mov dword [ebx + 0x30f0], ecx
cmp eax, 0x600
jge 0x54618b
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov byte [ebx + 0x30d7], 1
mov ecx, dword [0x67da2c]
mov dword [ebp - 0x18], ecx
mov edx, dword [ebx + 0x30e4]
mov byte [ebp - 4], 2
mov eax, dword [edx]
push eax
call sub.WSOCK32.dll_ntohl
mov ecx, dword [ebx + 0x30e4]
movsx edx, byte [ecx + 7]
push edx
movsx edx, byte [ecx + 6]
push edx
movsx edx, byte [ecx + 5]
movsx ecx, byte [ecx + 4]
push edx
push ecx
push eax
lea edx, [ebp - 0x18]
push str.Server_time:__ld_nVersion:__d._d._d._d_n
push edx
call fcn.00599a28
mov eax, dword [ebp - 0x18]
add esp, 0x1c
mov ecx, ebx
push eax
call fcn.0050e040
mov ecx, dword [ebx + 0x30c0]
push 0
push ecx
mov ecx, ebx
call fcn.0050e590
test eax, eax
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x18]
je 0x546217
call fcn.005a0c5d
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.005a0c5d
mov eax, dword [ebx + 0x30f4]
mov ecx, dword [ebx + 0x30e8]
mov edx, 0x600
push 0
sub edx, eax
add ecx, eax
push edx
mov edx, dword [ebx + 0x30c0]
push ecx
push edx
call sub.WSOCK32.dll_recv
mov esi, eax
push str.recv_handshake_p2
push esi
mov ecx, ebx
call fcn.0050e0e0
mov ecx, eax
test ecx, ecx
je 0x546272
sub eax, 0x2733
neg eax
sbb eax, eax
and eax, ecx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebx + 0x30f4]
add ecx, esi
mov eax, ecx
mov dword [ebx + 0x30f4], ecx
cmp eax, 0x600
jge 0x54629c
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [ebx + 0x30ec]
mov edi, dword [ebx + 0x30e8]
inc esi
mov ecx, 0x180
xor eax, eax
repe cmpsd dword [esi], dword es:[edi]
sete al
test al, al
jne 0x5462c5
push str.Part2_of_server_handshake_does_not_match__n
mov ecx, ebx
call fcn.0050e040
mov ecx, dword [ebx + 0x30e4]
mov edx, dword [ebx + 0x30c0]
xor esi, esi
push str.send_handshake_2_
push esi
push 0x600
push ecx
push edx
call sub.WSOCK32.dll_send
push eax
mov ecx, ebx
call fcn.0050e0e0
cmp eax, esi
jne 0x54638c
mov eax, dword [ebx + 0x30ec]
mov byte [ebp - 4], 3
push eax
call fcn.0059d022
mov eax, dword [ebx + 0x30e4]
add esp, 4
push eax
call fcn.0059d022
mov eax, dword [ebx + 0x30e8]
add esp, 4
push eax
call fcn.0059d022
add esp, 4
jmp 0x546333
mov ecx, ebx
mov dword [ebp - 4], esi
mov dword [ebx + 0x30ec], esi
mov dword [ebx + 0x30e4], esi
mov dword [ebx + 0x30e8], esi
call fcn.00546a20
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 8
mov ecx, dword [ebp - 0xc]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret