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

Disassembly:
push r12
push rbp
push rdi
push rsi
push rbx
sub rsp, 0x130
movzx esi, word [rcx + 0xa]
test edx, edx
mov rbx, rcx
je 0x541120
xor edx, edx
mov r8d, 4
mov rcx, rbx
call fcn.00516820
add rsp, 0x130
pop rbx
pop rsi
pop rdi
pop rbp
pop r12
ret
lea r8, [rsp + 0x40]
mov edx, 0x23
call fcn.0053e2f0
test eax, eax
js 0x5412f5
mov rdi, qword [rsp + 0x40]
mov eax, dword [rdi + 4]
test eax, eax
je 0x541108
movzx edx, word [rbx + 0xc]
mov rcx, rbx
call fcn.00531b80
test eax, eax
js 0x541300
movzx eax, word [rbx + 0xc]
lea rbp, [rsp + 0x70]
mov rcx, rbx
mov rdx, rbp
mov word [rbx + 0xa], ax
call fcn.0054a380
test eax, eax
js 0x541320
mov ecx, 4
call fcn.00520a40
mov r8d, eax
mov eax, dword [rsp + 0x78]
xor edx, edx
lea eax, [r8 + rax - 1]
div r8d
imul eax, r8d
mov dword [rsp + 0x88], eax
mov ecx, eax
call qword [fcn.005498f0]
test rax, rax
mov qword [rsp + 0x80], rax
je 0x541569
mov r8d, dword [rsp + 0x88]
xor edx, edx
mov rcx, rax
call sub.msvcrt.dll_memset
mov r8d, dword [rsp + 0x78]
mov rdx, qword [rsp + 0x70]
mov rcx, qword [rsp + 0x80]
call sub.msvcrt.dll_memcpy
mov rcx, rbp
call fcn.005456f0
lea rax, [rdi + 0x34]
lea rcx, [rsp + 0x90]
lea r9, [rsp + 0x60]
lea r8, [rsp + 0x50]
mov dword [rsp + 0x20], 1
mov edx, 4
mov qword [rsp + 0x50], rax
lea rax, [rdi + 8]
mov dword [rsp + 0x58], 0x10
mov dword [rsp + 0x68], 0x10
mov qword [rsp + 0x60], rax
call fcn.00549a10
test eax, eax
js 0x5414ed
mov rcx, qword [rsp + 0x90]
mov r8d, dword [rsp + 0x88]
mov rdx, qword [rsp + 0x80]
test rcx, rcx
je 0x541336
mov qword [rsp + 0x20], r8
mov r9, rdx
call qword [rsp + 0x98]
mov rcx, qword [rsp + 0x90]
test rcx, rcx
je 0x54128d
mov dword [rsp + 0x3c], eax
call qword [rsp + 0xc0]
mov eax, dword [rsp + 0x3c]
mov qword [rsp + 0x90], 0
test eax, eax
jns 0x541336
cmp dword [0x007f0400], 1
jg 0x54158e
lea rcx, [rsp + 0x80]
mov dword [rsp + 0x3c], eax
call fcn.005456f0
mov edx, dword [0x007f0400]
mov eax, dword [rsp + 0x3c]
cmp edx, 1
mov word [rbx + 0xa], si
jle 0x541108
mov dword [rsp + 0x3c], eax
mov r9d, 0x26c
lea r8, str.session_ticket.c
lea rdx, [0x0078af31]
mov ecx, 2
call fcn.0051c740
mov eax, dword [rsp + 0x3c]
jmp 0x541108
xor eax, eax
jmp 0x541108
cmp dword [0x007f0400], 1
jle 0x541108
mov dword [rsp + 0x3c], eax
mov r9d, 0x261
jmp 0x5412d4
cmp dword [0x007f0400], 1
jg 0x5415e3
mov word [rbx + 0xa], si
jmp 0x541108
mov rdx, qword [rdi + 0x2c]
mov r8d, dword [rsp + 0x68]
lea rcx, [rsp + 0xf0]
mov rax, qword [rdi + 0x24]
lea rbp, [rsp + 0xe0]
mov qword [rsp + 0xe8], rdx
mov rdx, qword [rsp + 0x60]
mov qword [rsp + 0xe0], rax
call sub.msvcrt.dll_memcpy
mov eax, dword [rsp + 0x88]
lea rcx, [rdi + 0x44]
lea r8, [rbp + 0x2a]
mov rdx, rbp
mov word [rsp + 0x108], ax
mov rax, qword [rsp + 0x80]
mov qword [rsp + 0x100], rax
call fcn.00540940
test eax, eax
mov edi, eax
js 0x541525
movzx eax, word [rsp + 0x108]
mov word [rbx + 0xa], si
lea r12d, [rax + 0x42]
movzx ebp, r12w
lea eax, [rbp + 6]
cdqe
lea rcx, [rax + 4]
add rax, 0xc
cmp dword [rbx + 0x1068], 1
cmove rcx, rax
mov rdx, rcx
call fcn.0053ca60
test rax, rax
mov rdi, rax
je 0x541548
xor eax, eax
cmp dword [rbx + 0x1068], 1
mov rdx, qword [rdi + 0x10]
mov ecx, r12d
sete al
sete r8b
shr cx, 8
lea eax, [rax*8 + 4]
movzx r8d, r8b
lea rsi, [rdx + r8*8 + 4]
add rsi, qword [rdi + 0x18]
mov dword [rdi + 0x30], eax
mov eax, dword [rbx + 0x930]
bswap eax
mov dword [rsi], eax
mov eax, ebp
lea rbp, [rsi + 0x28]
shl eax, 8
or ecx, eax
mov word [rsi + 4], cx
mov r10, qword [rsp + 0xe8]
mov rcx, rbp
mov r9, qword [rsp + 0xe0]
mov qword [rsi + 0xe], r10
mov qword [rsi + 6], r9
mov r10, qword [rsp + 0xf8]
mov r9, qword [rsp + 0xf0]
mov qword [rsi + 0x1e], r10
mov qword [rsi + 0x16], r9
movzx eax, word [rsp + 0x108]
rol ax, 8
mov word [rsi + 0x26], ax
movzx r8d, word [rsp + 0x108]
mov rdx, qword [rsp + 0x100]
call sub.msvcrt.dll_memcpy
mov rcx, qword [rsp + 0x100]
call qword [sub.msvcrt.dll_free]
movzx ecx, word [rsp + 0x108]
mov rax, qword [rsp + 0x10a]
add rcx, rbp
mov qword [rcx], rax
mov rax, qword [rsp + 0x112]
add rcx, 0x20
mov qword [rcx - 0x18], rax
mov rax, qword [rsp + 0x11a]
mov qword [rcx - 0x10], rax
mov rax, qword [rsp + 0x122]
mov qword [rcx - 8], rax
or byte [rbx + 0x1a8], 2
cmp ecx, esi
je 0x5410f8
mov rdx, rdi
jmp 0x5410fa
cmp dword [0x007f0400], 1
jle 0x5412a2
mov dword [rsp + 0x3c], eax
mov r9d, 0xe4
lea r8, str.session_ticket.c
lea rdx, [0x0078af31]
mov ecx, 2
call fcn.0051c740
mov eax, dword [rsp + 0x3c]
jmp 0x5412a2
cmp dword [0x007f0400], 1
jg 0x54159d
lea rcx, [rsp + 0x80]
call fcn.005456f0
mov edx, dword [0x007f0400]
mov eax, edi
jmp 0x5412bd
cmp dword [0x007f0400], 1
jg 0x5415c0
mov rcx, qword [rsp + 0x100]
call qword [sub.msvcrt.dll_free]
mov eax, 0xffffffe7
jmp 0x541108
cmp dword [0x007f0400], 1
jg 0x541614
mov rcx, rbp
call fcn.005456f0
mov edx, dword [0x007f0400]
mov eax, 0xffffffe7
jmp 0x5412bd
mov dword [rsp + 0x3c], eax
mov r9d, 0xee
jmp 0x541504
lea r8, str.session_ticket.c
lea rdx, [0x0078af31]
mov r9d, 0xfe
mov ecx, 2
call fcn.0051c740
jmp 0x54152e
lea r8, str.session_ticket.c
lea rdx, [0x0078af31]
mov r9d, 0x276
mov ecx, 2
call fcn.0051c740
jmp 0x541551
lea rdx, [0x0078af31]
lea r8, str.session_ticket.c
mov r9d, 0xc9
mov ecx, 2
mov dword [rsp + 0x3c], eax
call fcn.0051c740
mov edx, dword [0x007f0400]
mov eax, dword [rsp + 0x3c]
jmp 0x5412bd
lea r8, str.session_ticket.c
lea rdx, [0x0078af31]
mov r9d, 0xd3
mov ecx, 2
call fcn.0051c740
jmp 0x541576