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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff8
sub esp, 0x1c8
mov eax, dword [ebp + 0x14]
lea ebx, [esp + 0x140]
lea edi, [esp + 0x78]
mov esi, edx
mov dword [esp + 4], ecx
mov ecx, edi
mov edx, ebx
movsd xmm0, qword [eax + 0x58]
movsd xmm1, qword [eax + 0x60]
mov eax, dword [eax + 0x5c]
movsd qword [ebx + 8], xmm1
movsd qword [ebx], xmm0
mov dword [esp + 0x10], eax
call fcn.00530e41
movsd xmm0, qword [edi + 8]
movsd xmm2, qword [edi - 8]
movsd xmm1, qword [edi]
lea eax, [esp + 0x100]
mov dword [esp + 0x14], esi
mov dword [esp], 0
movsd qword [eax + 0x18], xmm0
movsd qword [eax + 0x10], xmm1
movsd qword [eax + 8], xmm2
and dword [eax + 4], 0
and dword [eax], 0
and dword [eax + 0x24], 0
and dword [eax + 0x20], 0
lea eax, [esi + 0xa60]
mov esi, dword [ebp + 0x14]
mov dword [esp + 0xc], eax
mov ecx, ebx
lea edx, [esp + 0x100]
call fcn.00547064
mov eax, dword [esp + 0x140]
mov ecx, dword [esp + 0x144]
mov edx, eax
xor edx, 0x18
or edx, ecx
je 0x540dd7
mov edx, eax
xor edx, 0x17
or edx, ecx
je 0x540e1a
movsd xmm0, qword [ebx + 0x38]
lea edx, [esp + 0x90]
movsd xmm1, qword [ebx + 0x28]
movsd qword [edx + 0x18], xmm0
movsd xmm0, qword [ebx + 0x30]
movsd qword [edx + 8], xmm1
movsd qword [edx + 0x10], xmm0
movsd xmm0, qword [ebx + 0x20]
movsd qword [edx], xmm0
lea edx, [esp + 0x148]
movsd xmm0, qword [edx + 0x10]
movsd xmm2, qword [edx]
movsd xmm1, qword [edx + 8]
movsd qword [edi + 0x10], xmm0
movsd qword [edi + 8], xmm1
movsd qword [edi], xmm2
mov dword [esp + 0x70], eax
add eax, 0xfffffffe
mov dword [esp + 0x74], ecx
adc ecx, 0xffffffff
push 0x14
pop edx
cmp edx, eax
mov edx, 0
sbb edx, ecx
jb 0x540a86
test eax, eax
jne 0x540a86
lea ecx, [esp + 0x70]
call fcn.0054811c
jmp 0x5409d1
mov eax, dword [0x7f2ec8]
mov dword [esp + 0x38], 2
mov dword [esp + 0x48], eax
lea esi, [eax + 0x1c]
mov ecx, dword [eax + 0x1c]
mov edx, dword [eax + 0x20]
mov edi, dword [eax + 0x24]
mov eax, dword [eax + 0x28]
and dword [esp + 0x68], 0
mov dword [esp + 0x6c], edx
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], edx
mov dword [esp + 0x60], edi
lea edi, [esp + 0xe0]
lea edx, [esp + 0x58]
mov dword [esp + 0x64], eax
mov ecx, edi
call fcn.0052f9c5
lea ecx, [esp + 0x12c]
mov edx, edi
push 0x769f30
call fcn.0052f9f9
pop eax
lea ecx, [esp + 0x70]
call fcn.005489e8
mov dword [esp + 0xd8], eax
mov dword [esp + 0xf4], edi
mov dword [esp + 0xf8], 1
mov dword [esp + 0xfc], esi
lea eax, [esp + 0xd8]
mov esi, dword [ebp + 0x14]
mov dword [esp + 0xdc], edx
lea ecx, [esp + 0x30]
lea edx, [esp + 0xf4]
mov dword [esp + 0xb4], eax
lea eax, [esp + 0x12c]
mov dword [esp + 0xe0], eax
lea eax, [esp + 0xb4]
mov dword [esp + 0xe4], eax
mov dword [esp + 0xe8], 0x769f40
call fcn.005de0b3
movsd xmm1, qword [esp + 0x38]
movsd xmm0, qword [esp + 0x30]
movsd xmm2, qword [esp + 0x40]
mov edx, dword [esp + 0x70]
mov ecx, dword [esp + 0xc]
movsd qword [esp + 0xc0], xmm1
movsd xmm1, qword [esp + 0x48]
movsd qword [esp + 0xb8], xmm0
movsd qword [esp + 0xc8], xmm2
movsd qword [esp + 0xd0], xmm1
push dword [esp + 0x80]
push dword [esp + 0x78]
call fcn.00548188
pop eax
pop ecx
mov eax, dword [esp + 0xc0]
lea edx, [esp + 0xb8]
mov ecx, 0
cmp eax, 3
cmove edx, ecx
mov dword [esp + 8], edx
push 2
pop edi
je 0x540c62
cmp eax, 2
je 0x540bf1
lea ecx, [esp + 0xc0]
lea edx, [esp + 0xb8]
call fcn.005de28d
mov eax, dword [esp + 0xd0]
test eax, eax
je 0x540c62
mov ecx, dword [eax + 0xc]
mov eax, dword [eax + 0x10]
mov dword [esp + 0x30], 0x767490
mov dword [esp + 0x34], 2
and dword [esp + 0x40], 0
mov edx, str.tracing::span::active__
mov dword [esp + 0x58], ecx
mov dword [esp + 0x5c], eax
lea eax, [esp + 0x58]
lea ecx, [esp + 0xb8]
mov dword [esp + 0xe0], eax
lea eax, [esp + 0xe0]
mov dword [esp + 0xe4], fcn.005d37d7
mov dword [esp + 0x38], eax
lea eax, [esp + 0x30]
mov dword [esp + 0x3c], 1
push eax
push 0x15
call fcn.0046f5dc
pop eax
pop ecx
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x74]
add eax, 0xfffffffe
adc ecx, 0xffffffff
cmp eax, 0x15
sbb ecx, 0
mov ecx, 0x3fffa
cmovae eax, edi
lea edi, [esp + 0x78]
cmp eax, 0x13
setae byte [esp + 0x20]
bt ecx, eax
setb byte [esp + 0x1c]
cmp byte [esp], 0
setne cl
cmp eax, 2
mov dword [esp], ecx
jb 0x540d7b
je 0x540d1f
cmp eax, 5
jne 0x540e4f
movsd xmm0, qword [edi + 0x10]
movsd xmm2, qword [edi]
movsd xmm1, qword [edi + 8]
movzx edx, byte [esi + 0x2b]
mov ecx, dword [esi]
movsd qword [esp + 0x68], xmm0
movsd qword [esp + 0x60], xmm1
movsd qword [esp + 0x58], xmm2
call fcn.0053d920
mov edx, dword [esp + 0x14]
movzx eax, al
lea ecx, [esp + 0x30]
mov dword [esp + 0x18], eax
push dword [esp + 0x10]
lea eax, [esp + 0x5c]
push eax
push dword [esp + 0x20]
call fcn.0054a3ee
add esp, 0xc
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov edx, eax
xor edx, 2
or edx, ecx
jne 0x540f4a
lea ecx, [esp + 0x58]
call fcn.00489f6a
jmp 0x540d7b
push 0x10
pop ecx
lea edi, [esp + 0x180]
lea esi, [esp + 0x70]
rep movsd dword es:[edi], dword [esi]
mov esi, dword [ebp + 0x14]
movzx edx, byte [esi + 0x2b]
mov ecx, dword [esi]
call fcn.0053d920
mov edx, dword [esp + 0x14]
movzx eax, al
lea ecx, [esp + 0x30]
lea edi, [esp + 0x180]
push edi
push eax
push dword [ebp + 0x10]
push dword [ebp + 0xc]
push dword [ebp + 8]
call fcn.00548b00
add esp, 0x14
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov edx, eax
xor edx, 2
or edx, ecx
jne 0x540f9a
lea edi, [esp + 0x78]
mov ecx, dword [esp + 8]
call fcn.00548aec
lea ecx, [esp + 0xb8]
call fcn.00548af5
mov eax, dword [esp + 0x70]
mov ecx, dword [esp + 0x74]
add eax, 0xfffffffe
adc ecx, 0xffffffff
cmp eax, 0x15
sbb ecx, 0
push 2
pop ecx
cmovae eax, ecx
cmp eax, 0x12
ja 0x540db9
mov ecx, 0x40024
bt ecx, eax
jb 0x540dc2
lea ecx, [esp + 0x70]
call fcn.0054811c
mov cl, byte [esp + 0x20]
mov eax, dword [esp]
or cl, byte [esp + 0x1c]
or al, cl
mov dword [esp], eax
jmp 0x5409d1
lea ecx, [esp + 0x110]
call fcn.00489f6a
movzx edx, byte [esi + 0x2b]
mov ecx, dword [esi]
call fcn.0053d920
mov ecx, dword [esp + 0x14]
mov edx, dword [esp]
movzx eax, al
imul eax, eax, 0x1d0
or byte [ecx + eax + 0x340], dl
call fcn.0054c435
mov eax, dword [esp + 4]
and dword [eax + 4], 0
mov dword [eax], 2
jmp 0x540e36
mov ecx, dword [esp + 4]
lea edx, [esp + 0x148]
call fcn.00548984
lea ecx, [esp + 0x110]
call fcn.00489f6a
mov ecx, esi
call fcn.00539b8b
add esi, 0x48
mov ecx, esi
call fcn.00489f6a
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
cmp eax, 0x12
jne 0x540eef
mov ecx, dword [esp + 0x78]
mov ebx, dword [esp + 0x7c]
mov esi, dword [esp + 0x90]
mov edx, dword [esp + 0x84]
mov edi, dword [esp + 0x80]
mov dword [esp + 0x18], 0
mov eax, ecx
mov dword [esp + 0xb0], esi
xor eax, 2
or eax, ebx
mov eax, dword [esp + 0x8c]
mov dword [esp + 0xc], eax
mov eax, dword [esp + 0x88]
mov dword [esp], eax
mov eax, dword [esp + 0x94]
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x9c]
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x98]
mov dword [esp + 0x20], eax
jne 0x540fe3
push 3
pop eax
mov dword [esp + 0x2c], edi
mov ebx, edx
mov edi, dword [esp]
mov edx, dword [esp + 0xc]
mov ecx, dword [esp + 0x10]
mov dword [esp + 0x28], eax
mov dword [esp], esi
mov dword [esp + 0x24], edx
mov dword [esp + 0xc], ecx
jmp 0x540ff2
push 0x1f
pop esi
mov ecx, esi
xor edx, edx
call fcn.00561541
mov edi, eax
mov ebx, edx
push esi
push str.illegal_frame_type_in_handshake
push edx
call fcn.00616830
add esp, 0xc
lea ecx, [esp + 0x70]
call fcn.005489e8
mov ecx, dword [esp + 4]
and dword [ecx + 4], 0
mov dword [ecx], 1
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], edx
and dword [ecx + 0x14], 0
mov al, 1
mov dword [ecx + 0x10], 0xa
mov dword [ecx + 0x18], edi
mov dword [ecx + 0x1c], ebx
mov dword [ecx + 0x20], esi
mov dword [esp + 4], eax
jmp 0x54109e
mov edx, dword [esp + 4]
movsd xmm1, qword [esp + 0x48]
movsd xmm0, qword [esp + 0x50]
movsd xmm2, qword [esp + 0x38]
movsd qword [edx + 0x18], xmm1
movsd xmm1, qword [esp + 0x40]
movsd qword [edx + 0x20], xmm0
movsd qword [edx + 8], xmm2
movsd qword [edx + 0x10], xmm1
mov dword [edx + 4], ecx
lea ecx, [esp + 0x58]
mov dword [edx], eax
call fcn.00489f6a
mov al, 1
xor ebx, ebx
mov dword [esp + 4], eax
mov al, 1
mov dword [esp], eax
jmp 0x5410ac
mov edx, dword [esp + 4]
movsd xmm1, qword [esp + 0x48]
movsd xmm0, qword [esp + 0x50]
movsd xmm2, qword [esp + 0x38]
mov bl, 1
mov dword [esp], 0
movsd qword [edx + 0x18], xmm1
movsd xmm1, qword [esp + 0x40]
movsd qword [edx + 0x20], xmm0
movsd qword [edx + 8], xmm2
movsd qword [edx + 0x10], xmm1
mov dword [edx], eax
mov al, 1
mov dword [edx + 4], ecx
mov dword [esp + 4], eax
jmp 0x5410a8
push 2
pop eax
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], ecx
mov dword [esp + 0x24], edx
mov esi, dword [esp + 0x14]
lea ecx, [esi + 0x950]
call fcn.005314ed
mov ecx, dword [esp + 0x28]
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x2c]
mov dword [esi + 0x950], ecx
mov ecx, dword [esp + 0x24]
mov dword [esi + 0x954], eax
mov dword [esi + 0x958], edx
mov dword [esi + 0x95c], ebx
mov edx, dword [esp + 0xc]
mov dword [esi + 0x960], edi
mov dword [esi + 0x964], ecx
mov ecx, dword [esp]
mov dword [esi + 0x96c], edx
mov edx, dword [esp + 0x10]
mov dword [esi + 0x968], ecx
mov ecx, dword [esp + 0xb0]
mov dword [esi + 0x974], edx
mov edx, dword [esp + 0x1c]
mov dword [esi + 0x970], ecx
mov ecx, dword [esp + 0x20]
mov dword [esi + 0x97c], edx
mov dword [esi + 0x978], ecx
lea ecx, [esi + 0x980]
call fcn.00539ee0
mov eax, dword [esp + 4]
mov dword [esi + 0x980], 3
mov dword [esp + 4], 0
and dword [eax + 4], 0
mov dword [eax], 2
mov al, 1
mov dword [esp], eax
mov esi, dword [ebp + 0x14]
mov bl, 1
lea edi, [esp + 0x78]
mov ecx, dword [esp + 8]
call fcn.00548aec
lea ecx, [esp + 0xb8]
call fcn.00548af5
mov ecx, dword [esp + 0x70]
mov eax, dword [esp + 0x74]
add ecx, 0xfffffffe
adc eax, 0xffffffff
cmp ecx, 0x15
sbb eax, 0
push 2
pop eax
cmovb eax, ecx
cmp eax, 2
je 0x541101
cmp eax, 5
je 0x541114
cmp eax, 0x12
jne 0x541128
cmp byte [esp + 4], 0
je 0x540e2a
mov ecx, edi
call fcn.00539f0e
jmp 0x540e2a
cmp byte [esp], 0
je 0x540e2a
lea ecx, [esp + 0x90]
jmp 0x54111e
test bl, bl
je 0x540e2a
mov ecx, edi
call fcn.00489f6a
jmp 0x540e2a
lea ecx, [esp + 0x70]
call fcn.0054811c
jmp 0x540e2a