Function at 0x4b5e30
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x78
mov eax, dword [0x5e4ce0]
xor eax, esp
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x7c]
push ebx
push esi
push edi
mov edi, dword [esp + 0x90]
push 0x10000
xor ebx, ebx
push ebx
mov esi, ecx
mov dword [esp + 0x34], eax
mov dword [esp + 0x14], edi
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
cmp eax, ebx
mov dword [esp + 0x14], eax
jne 0x4b5e90
mov edx, dword [edi]
mov eax, dword [edx + 0x10]
push str.Failed_to_allocate_memory_in_client_handshake_loop
mov ecx, edi
call eax
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x74]
xor ecx, esp
call fcn.004d99c4
add esp, 0x78
ret 0xc
mov ecx, dword [esp + 0x8c]
push ebp
xor ebp, ebp
mov dword [esp + 0x20], ecx
mov edi, 0x90312
cmp edi, 0x90312
je 0x4b5ebf
cmp edi, 0x80090318
je 0x4b5ebf
cmp edi, 0x90320
jne 0x4b6226
cmp ebp, ebx
je 0x4b5ecf
cmp edi, 0x80090318
jne 0x4b5f64
cmp dword [esp + 0x20], ebx
je 0x4b5f5c
mov edx, 0x10000
sub edx, ebp
lea edi, [esi + 0xc8]
push 0x3a98
mov ecx, edi
mov dword [esp + 0x20], edx
call fcn.004806c0
mov eax, dword [esp + 0x18]
lea ecx, [eax + ebp]
mov eax, dword [esi + 0xb4]
cmp eax, ebx
je 0x4b5f36
lea edx, [esi + 0xc4]
push edx
lea edx, [esi + 0xc6]
push edx
lea edx, [esp + 0x1f]
push edx
mov edx, dword [esi + 0xb8]
push eax
mov eax, dword [esp + 0x20]
push eax
push edx
lea eax, [esp + 0x34]
push eax
push ecx
mov ecx, edi
call fcn.00480d40
jmp 0x4b5f4e
mov edx, dword [esp + 0x10]
push ebx
push edx
lea eax, [esp + 0x1f]
push eax
lea edx, [esp + 0x28]
push edx
push ecx
mov ecx, edi
call fcn.00481cd0
cmp al, bl
je 0x4b60fe
add ebp, dword [esp + 0x1c]
jmp 0x4b5f64
mov dword [esp + 0x20], 1
mov eax, dword [esp + 0x18]
mov dword [esp + 0x3c], eax
mov eax, 2
mov dword [esp + 0x38], eax
mov dword [esp + 0x54], eax
mov dword [esp + 0x28], eax
lea ecx, [esp + 0x34]
mov dword [esp + 0x58], ecx
lea eax, [esp + 0x68]
push eax
lea edx, [esp + 0x28]
mov dword [esp + 0x68], edx
lea ecx, [esp + 0x50]
push ecx
mov ecx, dword [esi + 0xac]
lea edx, [esp + 0x64]
push edx
mov edx, dword [esi + 0xa8]
push ebx
push ebx
lea eax, [esp + 0x64]
push eax
push 0x10
push ebx
push 0xc11c
push ebx
push ecx
push edx
mov dword [esp + 0x64], ebp
mov dword [esp + 0x78], ebx
mov dword [esp + 0x70], ebx
mov dword [esp + 0x74], ebx
mov dword [esp + 0x80], ebx
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x54], ebx
mov dword [esp + 0x90], 1
mov dword [esp + 0x8c], ebx
call dword [0x5e7250]
mov edi, eax
cmp edi, 0x80090308
jne 0x4b600d
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
push str.Invalid_token.
call edx
jmp 0x4b6037
cmp edi, 0x80090326
jne 0x4b6027
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
push str.The_message_received_was_unexpected_or_badly_formatted.
call edx
jmp 0x4b6037
cmp edi, ebx
je 0x4b6041
cmp edi, 0x90312
je 0x4b6041
cmp edi, ebx
jge 0x4b6099
test dword [esp + 0x4c], 0x4000
je 0x4b6099
mov eax, dword [esp + 0x24]
cmp eax, ebx
je 0x4b6099
cmp dword [esp + 0x2c], ebx
je 0x4b6099
cmp eax, 0x2000
mov ecx, eax
jbe 0x4b605d
mov ecx, 0x2000
mov edx, dword [esi + 0xb4]
push edx
mov edx, dword [esp + 0x14]
push edx
mov edx, dword [esi + 0xb8]
push edx
push ecx
push eax
mov eax, dword [esp + 0x40]
push eax
lea ecx, [esi + 0xc8]
call fcn.00480ae0
test al, al
je 0x4b6118
mov ecx, dword [esp + 0x2c]
push ecx
call dword [0x5e7278]
mov dword [esp + 0x2c], ebx
cmp edi, 0x80090318
je 0x4b5ea3
cmp edi, ebx
je 0x4b616c
jl 0x4b61ec
cmp edi, 0x90320
jne 0x4b60d0
mov edx, dword [esp + 0x10]
push edx
mov ecx, esi
call fcn.004b5920
mov dword [esp + 0x20], ebx
jmp 0x4b5e9e
cmp dword [esp + 0x44], 5
jne 0x4b60f7
mov eax, dword [esp + 0x40]
push eax
sub ebp, eax
mov eax, dword [esp + 0x1c]
add ebp, eax
push ebp
push eax
call fcn.004dc8e0
mov ebp, dword [esp + 0x4c]
add esp, 0xc
jmp 0x4b5ea3
xor ebp, ebp
jmp 0x4b5ea3
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
push str.Error_reading_data_from_server_in_handshake_loop
call edx
mov edi, 0x80090304
jmp 0x4b622a
mov ecx, dword [esp + 0x10]
mov eax, dword [ecx]
mov edx, dword [eax + 0x10]
push str.Error_sending_data_to_server__2__in_handshake_loop
call edx
mov eax, dword [esp + 0x2c]
push eax
call dword [0x5e7278]
mov ecx, dword [esi + 0xac]
push ecx
call dword [0x5e725c]
mov edx, dword [esi + 0xac]
push edx
call fcn.004cac16
add esp, 4
pop ebp
pop edi
mov dword [esi + 0xac], ebx
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x74]
xor ecx, esp
call fcn.004d99c4
add esp, 0x78
ret 0xc
cmp dword [esp + 0x44], 5
jne 0x4b61de
mov esi, dword [esp + 0x30]
mov eax, dword [esp + 0x40]
push eax
mov dword [esi + 8], ebx
mov dword [esi], ebx
mov dword [esi + 4], ebx
call fcn.004cabe6
add esp, 4
cmp eax, ebx
mov dword [esi + 8], eax
jne 0x4b61ba
mov ecx, dword [esp + 0x10]
mov edx, dword [ecx]
mov eax, dword [edx + 0x10]
push str.Out_of_memory_in_handshake_loop
call eax
pop ebp
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [esp + 0x74]
xor ecx, esp
call fcn.004d99c4
add esp, 0x78
ret 0xc
mov ecx, dword [esp + 0x40]
sub ebp, ecx
add ebp, dword [esp + 0x18]
push ecx
push ebp
push eax
call fcn.004dc8e0
mov ecx, dword [esp + 0x4c]
add esp, 0xc
mov dword [esi], ecx
mov dword [esi + 4], 2
jmp 0x4b624c
mov eax, dword [esp + 0x30]
mov dword [eax + 8], ebx
mov dword [eax], ebx
mov dword [eax + 4], ebx
jmp 0x4b624c
push edi
lea edx, [esp + 0x74]
push 0x54040c
push edx
call fcn.004daca4
mov ebp, dword [esp + 0x1c]
mov eax, dword [ebp]
mov edx, dword [eax + 0x28]
add esp, 0xc
lea ecx, [esp + 0x70]
push ecx
push str.scRet
mov ecx, ebp
call edx
mov eax, dword [ebp]
mov edx, dword [eax + 0x10]
push str.Aborting_because_of_fatal_error
mov ecx, ebp
call edx
cmp edi, ebx
jge 0x4b624c
mov eax, dword [esi + 0xac]
push eax
call dword [0x5e725c]
mov ecx, dword [esi + 0xac]
push ecx
call fcn.004cac16
add esp, 4
mov dword [esi + 0xac], ebx
mov edx, dword [esp + 0x18]
push edx
call dword [sym.imp.KERNEL32.dll_LocalFree]
mov ecx, dword [esp + 0x84]
cmp edi, ebx
pop ebp
pop edi
pop esi
setge al
pop ebx
xor ecx, esp
call fcn.004d99c4
add esp, 0x78
ret 0xc