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

Disassembly:
sub esp, 0x6c
push ebx
push ebp
mov ebp, dword [esp + 0x78]
push esi
push edi
lea eax, [esp + 0x14]
push 0
push eax
push ebp
call fcn.004040c0
mov esi, dword [esp + 0x88]
mov ecx, dword [esp + 0x14]
mov dword [esp + 0x1c], ecx
mov al, byte [esi + 4]
cmp al, 0x48
je 0x407f08
mov ecx, dword [esp + 0xa0]
movsx edx, al
mov eax, dword [esp + 0xa4]
mov dword [ecx], edx
cmp dword [eax], 0x64
jge 0x407eec
mov dword [eax], 0x64
mov eax, dword [ecx]
push eax
push str.ERROR__c_from_server
push 1
call fcn.0040c900
add esp, 0xc
xor eax, eax
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x6c
ret
lea eax, [esi + 0x64]
push 0x40
lea ecx, [esp + 0x3c]
push eax
push ecx
mov dword [esp + 0x1c], eax
call fcn.0040cec0
lea edx, [esp + 0x44]
push edx
push str.RECEIVED_PACKET_from__s
push 1
call fcn.0040c900
lea eax, [esp + 0x50]
add esp, 0x18
test eax, eax
je 0x407f98
lea edi, [ebp + 0x4d95]
test edi, edi
je 0x407f98
mov cl, byte [esp + 0x38]
mov al, byte [edi]
cmp cl, al
jne 0x407f98
lea eax, [esp + 0x38]
mov dl, byte [eax]
mov bl, byte [edi]
mov cl, dl
cmp dl, bl
jne 0x407f78
test cl, cl
je 0x407f74
mov dl, byte [eax + 1]
mov bl, byte [edi + 1]
mov cl, dl
cmp dl, bl
jne 0x407f78
add eax, 2
add edi, 2
test cl, cl
jne 0x407f50
xor eax, eax
jmp 0x407f7d
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x407f98
mov eax, dword [esp + 0x98]
mov edx, dword [eax]
inc edx
mov ecx, edx
mov dword [eax], edx
cmp ecx, 2
jge 0x407efe
lea eax, [esi + 0xb6]
push 8
push eax
call fcn.0040cf30
lea ecx, [esi + 0xbe]
push 0x20
push ecx
mov dword [ebp + 0x12c], eax
call fcn.0040cf30
mov bl, byte [esi + 5]
lea edx, [esi + 0x19e]
push 2
push edx
mov dword [esp + 0xa0], eax
call fcn.0040d190
mov edi, dword [ebp + 0x12c]
mov dword [esp + 0x30], eax
xor eax, eax
movsx ebp, bl
test edi, edi
movsx edi, byte [esi + 0x1a6]
sete al
push ebp
push eax
movsx eax, byte [esi + 3]
push edi
push eax
mov dword [esp + 0x48], ebp
call fcn.004082a0
mov ebx, eax
mov al, byte [esi + 3]
add esp, 0x28
cmp al, 0x46
mov dword [esp + 0x98], ebx
je 0x408075
cmp al, 0x4c
je 0x40802c
lea ecx, [esp + 0x38]
mov dword [esp + 0x88], 0xffffffff
push ecx
push str._s:_NO_FEATURE
jmp 0x40808a
mov eax, dword [esp + 0x9c]
mov edx, dword [esp + 0x88]
mov dword [esp + 0x88], edx
cmp dword [eax], 2
jle 0x40804c
mov dword [eax], 2
test edi, edi
mov ecx, str.SHARED
jne 0x40805a
mov ecx, 0x421a30
mov eax, dword [eax]
push eax
push edx
push ecx
lea ecx, [esp + 0x44]
push ecx
push str._s:_YES__s__ld___cut_timeout_to__d_seconds.
push 1
call fcn.0040c900
add esp, 0x18
jmp 0x408094
lea edx, [esp + 0x38]
mov dword [esp + 0x88], 0
push edx
push str._s:_YES_FEATURE
push 1
call fcn.0040c900
add esp, 0xc
mov eax, dword [esp + 0x8c]
test eax, eax
je 0x40817c
mov ebx, dword [esp + 0x94]
mov eax, dword [esp + 0x90]
cmp dword [ebx], eax
jge 0x408175
cmp ebp, 0x6d
ja case.0x4080c6.3
xor ecx, ecx
mov cl, byte [ebp + 0x408230]
jmp dword [ecx*4 + 0x408220]
mov ebp, 1
jmp 0x4080e5
mov ebp, 2
jmp 0x4080e5
mov ebp, 3
jmp 0x4080e5
or ebp, 0xffffffff
mov eax, dword [esp + 0x84]
lea edx, [esp + 0x24]
push edx
push eax
call fcn.00407490
mov edx, dword [esp + 0x88]
sub esp, 0xc
mov ecx, 5
lea esi, [esp + 0x38]
mov eax, dword [edx + 0x12c]
mov edi, esp
mov edx, dword [esp + 0xa4]
rep movsd dword es:[edi], dword [esi]
mov ecx, dword [esp + 0x2c]
mov esi, dword [esp + 0x24]
push ecx
mov ecx, dword [esp + 0xa0]
push ebp
push eax
mov eax, dword [esp + 0xac]
push ecx
push esi
push edx
push eax
call fcn.00404b20
mov ebp, dword [ebx]
mov ecx, dword [esp + 0xcc]
add ebp, eax
mov eax, dword [esp + 0x4c]
cdq
sub eax, edx
mov dword [ebx], ebp
mov edx, dword [ecx]
add esp, 0x30
sar eax, 1
cmp edx, eax
jle 0x40815e
mov dword [ecx], eax
mov ecx, dword [ecx]
push ecx
push esi
push str._s:_add_server__cut_timeout_to__d_seconds.
push 1
call fcn.0040c900
mov ebp, dword [esp + 0x30]
add esp, 0x10
mov ebx, dword [esp + 0x98]
mov esi, dword [esp + 0xa4]
mov edi, dword [esp + 0xa8]
mov eax, dword [esi]
cmp ebx, eax
jg 0x4081af
cmp ebx, eax
jne 0x407efe
mov edx, dword [esp + 0x80]
mov ecx, dword [edi]
mov eax, dword [edx + 0x12c]
cmp eax, ecx
jge 0x407efe
mov ecx, dword [esp + 0xb0]
mov edx, dword [esp + 0x84]
push ecx
push edx
call fcn.00407490
mov eax, dword [esp + 0x88]
mov edx, dword [esp + 0xa8]
mov dword [esi], ebx
push 0x40
mov ecx, dword [eax + 0x12c]
mov eax, dword [esp + 0x1c]
mov dword [edi], ecx
mov ecx, dword [esp + 0xb8]
push eax
push ecx
mov dword [edx], ebp
call fcn.0040cec0
mov eax, dword [esp + 0xa0]
add esp, 0x14
test eax, eax
jne 0x407efe
cmp dword [esi], 0x1a7
jl 0x407efe
pop edi
pop esi
pop ebp
mov eax, 1
pop ebx
add esp, 0x6c
ret