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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x9c
lea edx, [esp + 0x3c]
mov dword [esp + 0x20], ecx
lea eax, [esp + 0x90]
mov dword [esp], edx
mov dword [esp + 0x54], 0x567468
mov dword [esp + 0x58], 0x5c1f80
mov dword [esp + 0x5c], eax
mov dword [esp + 0x60], 0x4a9e34
mov dword [esp + 0x64], esp
call sub.libgcc_s_sjlj_1.dll__Unwind_SjLj_Register
mov edi, dword [esp + 0xb0]
cmp dword [edi + 4], 0x25
jbe 0x4a9db1
mov edx, dword [esp + 0xb0]
mov dword [esp + 0x7c], 0
mov edi, dword [esp + 0x20]
mov eax, dword [edx]
mov dword [esp + 0x78], edx
movzx edx, byte [eax]
movzx eax, byte [eax + 1]
mov dword [esp + 0x7c], 2
shl edx, 8
or eax, edx
movzx eax, ax
mov dword [edi + 4], eax
sub eax, 0x300
cmp eax, 2
ja 0x4a9d26
mov dword [esp], 1
mov dword [esp + 0x80], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x40], 7
call fcn.0049b590
lea edx, [esp + 0x80]
mov dword [esp], 0x20
mov ecx, edx
mov dword [esp + 0x8c], eax
mov dword [esp + 0x1c], edx
call fcn.005769c0
sub esp, 4
xor eax, eax
nop
lea esi, [esi]
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x7c]
add edx, dword [ecx]
movzx ecx, byte [edx + eax]
mov edx, dword [esp + 0x80]
mov byte [edx + eax], cl
add eax, 1
cmp eax, 0x20
jne 0x4a9a80
mov ecx, dword [esp + 0x20]
add dword [esp + 0x7c], 0x20
add ecx, 0x18
cmp ecx, dword [esp + 0x1c]
je 0x4a9af8
mov eax, dword [esp + 0x84]
mov dword [esp + 0x40], 5
mov dword [esp], eax
call fcn.005769c0
sub esp, 4
mov edx, dword [esp + 0x20]
mov eax, dword [esp + 0x84]
cmp dword [edx + 0x1c], eax
cmovbe eax, dword [edx + 0x1c]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 4], eax
mov eax, dword [edx + 0x18]
mov dword [esp], eax
call sub.msvcrt.dll_memmove
mov ecx, dword [esp + 0x8c]
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x80]
test ecx, ecx
je 0x4a9b19
test eax, eax
jne 0x4a9cd0
mov dword [esp + 0xc], 0x20
lea ecx, [esp + 0x78]
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 1
mov dword [esp + 0x40], 0xffffffff
call fcn.00581240
sub esp, 0x10
mov dword [esp + 0x24], eax
mov eax, dword [esp + 0x78]
mov eax, dword [eax + 4]
sub eax, dword [esp + 0x7c]
cmp dword [esp + 0x24], eax
ja 0x4a9e47
mov dword [esp], 1
mov dword [esp + 0x80], 0
mov dword [esp + 0x8c], 0
mov dword [esp + 0x88], 0
mov dword [esp + 0x84], 0
mov dword [esp + 0x40], 0xa
call fcn.0049b590
mov dword [esp + 0x8c], eax
mov eax, dword [esp + 0x24]
lea ecx, [esp + 0x80]
mov dword [esp], eax
call fcn.005769c0
sub esp, 4
xor eax, eax
mov edx, dword [esp + 0x24]
mov ebx, dword [esp + 0x24]
test edx, edx
je 0x4a9bef
mov ecx, dword [esp + 0x78]
mov edx, dword [esp + 0x7c]
add edx, dword [ecx]
movzx ecx, byte [edx + eax]
mov edx, dword [esp + 0x80]
mov byte [edx + eax], cl
add eax, 1
cmp eax, ebx
jne 0x4a9bd0
mov ecx, dword [esp + 0x20]
mov eax, dword [esp + 0x24]
add ecx, 8
add dword [esp + 0x7c], eax
cmp ecx, dword [esp + 0x1c]
je 0x4a9c4a
mov eax, dword [esp + 0x84]
mov dword [esp + 0x40], 6
mov dword [esp], eax
call fcn.005769c0
sub esp, 4
mov edi, dword [esp + 0x20]
mov eax, dword [esp + 0x84]
cmp dword [edi + 0xc], eax
cmovbe eax, dword [edi + 0xc]
mov dword [esp + 8], eax
mov eax, dword [esp + 0x80]
mov dword [esp + 4], eax
mov eax, dword [edi + 8]
mov dword [esp], eax
call sub.msvcrt.dll_memmove
mov ecx, dword [esp + 0x8c]
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0x80]
test ecx, ecx
je 0x4a9c6b
test eax, eax
jne 0x4a9d00
mov edx, dword [esp + 0x78]
mov eax, dword [esp + 0x7c]
mov esi, dword [edx + 4]
mov ecx, esi
sub ecx, eax
cmp ecx, 1
jbe 0x4aa053
mov edx, dword [edx]
mov edi, dword [esp + 0x20]
movzx ebx, byte [edx + eax]
movzx ecx, byte [edx + eax + 1]
shl ebx, 8
or ecx, ebx
lea ebx, [eax + 2]
mov word [edi + 0x28], cx
cmp ebx, esi
mov dword [esp + 0x7c], ebx
je 0x4a9fd0
movzx eax, byte [edx + eax + 2]
lea edx, [esp + 0x3c]
mov edi, dword [esp + 0x20]
mov byte [edi + 0x2a], al
mov dword [esp], edx
call sub.libgcc_s_sjlj_1.dll__Unwind_SjLj_Unregister
add esp, 0x9c
pop ebx
pop esi
pop edi
pop ebp
ret 4
test edx, edx
je 0x4a9b19
mov ebx, dword [ecx]
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, dword [ebx + 4]
mov dword [esp + 0x40], 0xffffffff
call eax
sub esp, 8
jmp 0x4a9b19
test edx, edx
je 0x4a9c6b
mov ebx, dword [ecx]
mov dword [esp + 4], eax
mov dword [esp], edx
mov eax, dword [ebx + 4]
mov dword [esp + 0x40], 0xffffffff
call eax
sub esp, 8
jmp 0x4a9c6b
mov dword [esp], 0xc
call sub.libstdc_6.dll___cxa_allocate_exception
mov dword [esp], str.Server_Hello:_Unsupported_server_version
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x74]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x73]
mov ecx, dword [esp + 0x20]
mov dword [esp + 4], eax
mov dword [esp + 0x40], 3
call fcn.005674b8
sub esp, 8
mov edx, dword [esp + 0x20]
mov dword [esp], 0x46
mov ecx, dword [esp + 0x2c]
mov dword [esp + 0x40], 4
mov dword [esp + 4], edx
call fcn.00579a50
sub esp, 8
mov ecx, dword [esp + 0x20]
call fcn.00567508
mov eax, dword [esp + 0x2c]
mov dword [esp + 8], 0x579aa0
mov dword [esp + 4], 0x62d660
mov dword [esp + 0x40], 0xffffffff
mov dword [esp], eax
call sub.libstdc_6.dll___cxa_throw
mov dword [esp], 8
call sub.libstdc_6.dll___cxa_allocate_exception
mov dword [esp], str.Server_Hello:_Packet_corrupted
mov dword [esp + 0x28], eax
lea eax, [esp + 0x74]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x73]
mov ecx, dword [esp + 0x20]
mov dword [esp + 4], eax
mov dword [esp + 0x40], 1
call fcn.005674b8
sub esp, 8
mov edx, dword [esp + 0x20]
mov dword [esp + 0x40], 2
mov ecx, dword [esp + 0x28]
mov dword [esp], edx
call fcn.0057b760
sub esp, 4
mov ecx, dword [esp + 0x20]
call fcn.00567508
mov eax, dword [esp + 0x28]
mov dword [esp + 8], fcn.0057b960
mov dword [esp + 4], 0x62d7c0
mov dword [esp + 0x40], 0xffffffff
mov dword [esp], eax
call sub.libstdc_6.dll___cxa_throw
mov eax, dword [esp + 0x44]
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x40]
jmp dword [eax*4 + 0x5d25c4]
mov dword [esp], 8
lea edi, [esp + 0x74]
call sub.libstdc_6.dll___cxa_allocate_exception
mov dword [esp], str.TLS_Data_Reader:_Corrupt_packet
mov ecx, edi
mov dword [esp + 0x30], eax
lea eax, [esp + 0x73]
mov dword [esp + 4], eax
mov dword [esp + 0x20], edi
mov dword [esp + 0x40], 8
call fcn.005674b8
sub esp, 8
mov ecx, dword [esp + 0x30]
mov dword [esp], edi
mov dword [esp + 0x40], 9
call fcn.0057b760
sub esp, 4
mov ecx, edi
call fcn.00567508
mov eax, dword [esp + 0x30]
mov dword [esp + 8], fcn.0057b960
mov dword [esp + 4], 0x62d7c0
mov dword [esp + 0x40], 0xffffffff
mov dword [esp], eax
call sub.libstdc_6.dll___cxa_throw
lea ecx, [esp + 0x74]
call fcn.00567508
mov eax, dword [esp + 0x28]
mov dword [esp], eax
call sub.libstdc_6.dll___cxa_free_exception
mov edx, dword [esp + 0x20]
mov dword [esp + 0x40], 0xffffffff
mov dword [esp], edx
call sub.libgcc_s_sjlj_1.dll__Unwind_SjLj_Resume
lea ecx, [esp + 0x74]
call fcn.00567508
mov eax, dword [esp + 0x2c]
jmp 0x4a9ecf
lea ecx, [esp + 0x80]
mov dword [esp + 0x40], 0
call fcn.00577dd0
mov edi, dword [esp + 0x20]
mov dword [esp + 0x40], 0xffffffff
mov dword [esp], edi
call sub.libgcc_s_sjlj_1.dll__Unwind_SjLj_Resume
lea ecx, [esp + 0x80]
mov dword [esp + 0x40], 0
call fcn.00577dd0
mov eax, dword [esp + 0x20]
mov dword [esp + 0x40], 0xffffffff
mov dword [esp], eax
call sub.libgcc_s_sjlj_1.dll__Unwind_SjLj_Resume
lea ecx, [esp + 0x80]
mov dword [esp + 0x40], 0
call fcn.00576b30
mov edi, dword [esp + 0x20]
mov dword [esp + 0x40], 0xffffffff
mov dword [esp], edi
call sub.libgcc_s_sjlj_1.dll__Unwind_SjLj_Resume
lea ecx, [esp + 0x74]
call fcn.00567508
mov eax, dword [esp + 0x30]
jmp 0x4a9ecf
lea ecx, [esp + 0x80]
mov dword [esp + 0x40], 0
call fcn.00576b30
mov edx, dword [esp + 0x20]
mov dword [esp + 0x40], 0xffffffff
mov dword [esp], edx
call sub.libgcc_s_sjlj_1.dll__Unwind_SjLj_Resume
lea ecx, [esp + 0x74]
call fcn.00567508
mov eax, dword [esp + 0x34]
jmp 0x4a9ecf
lea ecx, [esp + 0x74]
call fcn.00567508
mov eax, dword [esp + 0x38]
jmp 0x4a9ecf
mov dword [esp], 8
call sub.libstdc_6.dll___cxa_allocate_exception
mov dword [esp], str.TLS_Data_Reader:_Corrupt_packet
mov dword [esp + 0x38], eax
lea eax, [esp + 0x74]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x73]
mov ecx, dword [esp + 0x20]
mov dword [esp + 4], eax
mov dword [esp + 0x40], 0xd
call fcn.005674b8
sub esp, 8
mov edx, dword [esp + 0x20]
mov dword [esp + 0x40], 0xe
mov ecx, dword [esp + 0x38]
mov dword [esp], edx
call fcn.0057b760
sub esp, 4
mov ecx, dword [esp + 0x20]
call fcn.00567508
mov eax, dword [esp + 0x38]
mov dword [esp + 8], fcn.0057b960
mov dword [esp + 4], 0x62d7c0
mov dword [esp + 0x40], 0xffffffff
mov dword [esp], eax
call sub.libstdc_6.dll___cxa_throw
mov dword [esp], 8
call sub.libstdc_6.dll___cxa_allocate_exception
mov dword [esp], str.TLS_Data_Reader:_Corrupt_packet
mov dword [esp + 0x34], eax
lea eax, [esp + 0x74]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x73]
mov ecx, dword [esp + 0x20]
mov dword [esp + 4], eax
mov dword [esp + 0x40], 0xb
call fcn.005674b8
sub esp, 8
mov edx, dword [esp + 0x20]
mov dword [esp + 0x40], 0xc
mov ecx, dword [esp + 0x34]
mov dword [esp], edx
call fcn.0057b760
sub esp, 4
mov ecx, dword [esp + 0x20]
call fcn.00567508
mov eax, dword [esp + 0x34]
mov dword [esp + 8], fcn.0057b960
mov dword [esp + 4], 0x62d7c0
mov dword [esp + 0x40], 0xffffffff
mov dword [esp], eax
call sub.libstdc_6.dll___cxa_throw
lea esi, [esi]
lea edi, [edi]