Function at 0x4522c0
Capabilities:
Check for time delay via gettickcount

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x45c
mov eax, dword [0x596c60]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0x14]
push ebx
mov ebx, dword [ebp + 0x10]
push esi
mov esi, dword [ebp + 0x1c]
push edi
mov edi, dword [ebp + 8]
push 0x3ff
lea ecx, [ebp - 0x403]
push 0
push ecx
mov dword [ebp - 0x440], ebx
mov dword [ebp - 0x408], eax
mov dword [ebp - 0x420], esi
mov byte [ebp - 0x404], 0
call fcn.0050c510
xor eax, eax
add esp, 0xc
cmp edi, eax
mov dword [ebp - 0x40c], eax
mov dword [ebp - 0x410], eax
je 0x452835
cmp ebx, eax
je 0x452835
cmp esi, eax
je 0x452835
cmp dword [ebp - 0x408], eax
je 0x452835
cmp dword [ebp + 0x18], eax
jne 0x452351
mov edx, dword [edi + 0x10050]
mov dword [ebp + 0x18], edx
mov dword [esi], eax
mov esi, 0x90312
cmp esi, 0x90312
je 0x452374
cmp esi, 0x80090318
je 0x452374
cmp esi, 0x90320
jne 0x45299e
mov eax, dword [ebp - 0x408]
push eax
mov dword [ebp - 0x424], 0
call fcn.004437d0
add esp, 4
test eax, eax
je 0x45239d
cmp esi, 0x80090318
jne 0x452515
cmp dword [edi + 0x2c], 0
je 0x45250e
push str.attempting_to_read_data_for_handshake_n
push 1
call fcn.00477440
add esp, 8
cmp dword [edi + 0x30], 0
jne 0x4523cc
mov dword [edi + 0x30], 1
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov dword [edi + 0x34], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov ebx, dword [ebp + 0x18]
mov esi, eax
sub esi, dword [edi + 0x34]
cmp esi, ebx
jae 0x452826
mov edx, dword [ebp + 0xc]
mov ecx, ebx
sub ecx, esi
push ecx
push 0
push 1
push edx
call fcn.00451910
add esp, 0x10
test eax, eax
je 0x45283f
mov eax, dword [ebp + 0xc]
push 0x10000
lea ebx, [edi + 0x40]
push ebx
push eax
call fcn.00451850
mov esi, eax
add esp, 0xc
cmp esi, 0xffffffff
je 0x4527e7
test esi, esi
je 0x45285b
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push esi
push str._d_bytes_of_handshake_data_received_n
push 1
mov dword [edi + 0x34], eax
mov dword [edi + 0x30], 1
call fcn.00477440
mov ecx, dword [ebp - 0x408]
push esi
push ebx
push ecx
call fcn.00443d10
add esp, 0x18
test eax, eax
je 0x452835
mov ebx, dword [ebp - 0x408]
push ebx
call fcn.004437f0
mov esi, eax
add esp, 4
test esi, esi
je 0x452835
push ebx
call fcn.004437d0
mov ecx, dword [edi + 0x3c]
add esp, 4
test ecx, ecx
je 0x452515
lea edx, [ebp - 0x410]
push edx
lea edx, [ebp - 0x40c]
push edx
push eax
push esi
push edi
call ecx
add esp, 0x14
test eax, eax
je 0x452835
xor esi, esi
cmp dword [ebp - 0x410], esi
jne 0x4524bc
mov esi, 0x80090318
jmp 0x452358
push ebx
call fcn.004439a0
add esp, 4
cmp eax, 1
jne 0x452835
mov eax, dword [ebp - 0x410]
mov ecx, dword [ebp - 0x40c]
push eax
push ecx
push ebx
call fcn.00443d10
add esp, 0xc
test eax, eax
je 0x452835
mov eax, dword [ebp - 0x40c]
cmp eax, esi
je 0x452506
push eax
call fcn.00507b54
add esp, 4
mov dword [ebp - 0x40c], esi
mov dword [ebp - 0x410], esi
jmp 0x452515
mov dword [edi + 0x2c], 1
mov edx, dword [ebp - 0x408]
push edx
call fcn.004437f0
mov esi, eax
xor ebx, ebx
add esp, 4
cmp esi, ebx
je 0x452835
mov eax, dword [ebp - 0x408]
push eax
call fcn.004437d0
mov dword [ebp - 0x444], eax
mov dword [ebp - 0x43c], eax
mov eax, 2
mov dword [ebp - 0x438], eax
mov dword [ebp - 0x44c], eax
mov dword [ebp - 0x418], eax
mov eax, dword [edi + 0x24]
add esp, 4
cmp eax, ebx
lea ecx, [ebp - 0x43c]
lea edx, [ebp - 0x41c]
mov dword [ebp - 0x434], esi
mov dword [ebp - 0x428], ebx
mov dword [ebp - 0x430], ebx
mov dword [ebp - 0x42c], ebx
mov dword [ebp - 0x448], ecx
mov dword [ebp - 0x450], ebx
mov dword [ebp - 0x414], ebx
mov dword [ebp - 0x41c], ebx
mov dword [ebp - 0x458], 1
mov dword [ebp - 0x454], edx
mov dword [ebp - 0x45c], ebx
je 0x4525bf
xor edx, edx
jmp 0x4525c2
lea edx, [edi + 0x1c]
cmp eax, ebx
je 0x4525cb
lea ecx, [edi + 0x1c]
jmp 0x4525cd
xor ecx, ecx
push ebx
lea esi, [ebp - 0x424]
push esi
lea esi, [ebp - 0x45c]
push esi
push edx
mov edx, eax
neg edx
push ebx
sbb edx, edx
lea esi, [ebp - 0x450]
and edx, esi
push edx
mov edx, dword [edi + 0x28]
neg eax
push ebx
sbb eax, eax
push ebx
not eax
and eax, dword [ebp - 0x440]
push edx
push eax
push ecx
lea eax, [edi + 4]
push eax
call sub.Secur32.dll_InitializeSecurityContextA
cmp dword [edi + 0x24], ebx
mov esi, eax
jne 0x452650
cmp esi, 0x90312
je 0x45263d
cmp esi, 0x90313
je 0x45263d
cmp esi, 0x90314
je 0x45263d
cmp esi, 0x90320
je 0x45263d
cmp esi, ebx
je 0x45263d
cmp esi, 0x80090318
jne 0x452644
mov dword [edi + 0x24], 1
cmp esi, 0x90312
jne 0x452880
cmp esi, ebx
je 0x452674
cmp esi, 0x90312
je 0x452674
cmp esi, ebx
jge 0x452740
test dword [ebp - 0x424], 0x4000
je 0x452740
cmp dword [ebp - 0x41c], ebx
je 0x452740
mov edx, dword [ebp - 0x414]
cmp edx, ebx
je 0x452740
mov eax, dword [edi + 0x38]
cmp eax, ebx
je 0x4526bf
lea ecx, [ebp - 0x410]
push ecx
lea ecx, [ebp - 0x40c]
push ecx
mov ecx, dword [ebp - 0x41c]
push ecx
push edx
push edi
call eax
add esp, 0x14
test eax, eax
je 0x4528c1
mov edx, dword [ebp - 0x414]
mov ecx, dword [ebp - 0x410]
cmp ecx, ebx
jne 0x452782
mov ecx, dword [ebp - 0x41c]
mov eax, edx
mov edx, dword [ebp + 0xc]
push ecx
push eax
push edx
call fcn.00451810
add esp, 0xc
cmp eax, 0xffffffff
je 0x4528ea
cmp eax, ebx
je 0x4528ea
push eax
push str._d_bytes_of_handshake_data_sent_n
push 1
call fcn.00477440
mov eax, dword [ebp - 0x414]
add esp, 0xc
cmp eax, ebx
je 0x45271a
push eax
call sub.Secur32.dll_FreeContextBuffer
mov dword [ebp - 0x414], ebx
mov eax, dword [ebp - 0x40c]
cmp eax, ebx
mov dword [edi + 0x2c], 1
je 0x45273a
push eax
call fcn.00507b54
add esp, 4
mov dword [ebp - 0x40c], ebx
mov dword [ebp - 0x410], ebx
cmp esi, 0x80090318
je 0x452358
test esi, esi
je 0x45291a
jl 0x452976
cmp esi, 0x90320
jne 0x45278d
cmp dword [edi], 0
jne 0x452776
mov ecx, edi
call fcn.00450960
test eax, eax
jne 0x452835
mov dword [edi + 0x2c], 0
jmp 0x452353
mov eax, dword [ebp - 0x40c]
jmp 0x4526d5
cmp dword [ebp - 0x42c], 5
jne 0x4527c5
mov eax, dword [ebp - 0x444]
sub eax, dword [ebp - 0x430]
push eax
mov eax, dword [ebp - 0x408]
push eax
call fcn.00443970
add esp, 8
cmp eax, 1
je 0x452358
mov esi, 0x80090304
jmp 0x4529a2
mov ecx, dword [ebp - 0x408]
push ecx
call fcn.004439a0
add esp, 4
cmp eax, 1
je 0x452358
mov esi, 0x80090304
jmp 0x4529a2
mov esi, dword [sym.imp.WS2_32.dll_WSAGetLastError]
call esi
cmp eax, 0x2733
je 0x452835
push str.error_reading_handshake_data_n
push 1
call fcn.00477440
add esp, 8
push 0x400
lea edx, [ebp - 0x404]
push edx
call esi
push eax
call fcn.00470ef0
add esp, 0xc
mov esi, 0x80090304
jmp 0x4529a2
push str.handshake_timed_out__n
push 1
call fcn.00477440
add esp, 8
mov esi, 0x80090304
jmp 0x4529a2
sub ebx, esi
push ebx
push str.handshake_data_not_ready__timeout_ms:__d_n
push 1
call fcn.00477440
add esp, 0xc
mov esi, 0x80090304
jmp 0x4529a2
push str.server_disconnected_during_handshake_n
push 1
call fcn.00477440
mov eax, dword [ebp - 0x420]
add esp, 8
mov dword [eax], 1
mov esi, 0x80090304
jmp 0x4529a2
push 0x400
lea ecx, [ebp - 0x404]
push ecx
push esi
call fcn.00470ef0
lea edx, [ebp - 0x404]
push edx
push str.InitializeSecurityContext___failed:__s
push 1
call fcn.00477440
mov eax, dword [ebp - 0x414]
add esp, 0x18
cmp eax, ebx
je 0x45299e
push eax
call sub.Secur32.dll_FreeContextBuffer
jmp 0x45299e
push str.authdata__ath_before_data_send___failed
push 1
call fcn.00477440
add esp, 8
mov eax, dword [ebp - 0x414]
cmp eax, ebx
je 0x4528e0
push eax
call sub.Secur32.dll_FreeContextBuffer
mov esi, 0x80090304
jmp 0x4529a2
push 0x400
lea eax, [ebp - 0x404]
push eax
call dword [sym.imp.WS2_32.dll_WSAGetLastError]
push eax
call fcn.00470ef0
lea ecx, [ebp - 0x404]
push ecx
push str.Error_sending_handshake_data_to_server_2_:__s
push 1
call fcn.00477440
add esp, 0x18
jmp 0x4528d0
mov edx, dword [ebp - 0x420]
mov ebx, dword [ebp - 0x408]
push ebx
mov dword [edx], 1
call fcn.004439a0
add esp, 4
cmp eax, 1
jne 0x4528e0
cmp dword [ebp - 0x42c], 5
jne 0x4529b1
mov eax, dword [ebp - 0x430]
mov ecx, dword [ebp - 0x428]
push eax
push ecx
push ebx
call fcn.00443d10
add esp, 0xc
test eax, eax
je 0x4528e0
mov edx, dword [ebp - 0x430]
push edx
push str._d_bytes_of_app_data_bundled_with_handshake_data_n
push 1
call fcn.00477440
add esp, 0xc
jmp 0x4529b1
push 0x400
lea eax, [ebp - 0x404]
push eax
push esi
call fcn.00470ef0
lea ecx, [ebp - 0x404]
push ecx
push str.Error_returned_by_InitializeSecurityContext___on_connect:__s
push 1
call fcn.00477440
add esp, 0x18
test esi, esi
je 0x4529b1
mov edx, dword [ebp - 0x408]
push edx
call fcn.004439a0
add esp, 4
mov eax, dword [ebp - 0x420]
test eax, eax
je 0x4529cb
cmp dword [eax], 0
jne 0x4529c4
test esi, esi
je 0x4529cb
mov dword [edi + 0x30], 0
mov eax, dword [ebp - 0x40c]
test eax, eax
je 0x4529de
push eax
call fcn.00507b54
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.005072fd
mov esp, ebp
pop ebp
ret