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

Disassembly:
push r15
push r14
push r13
push r12
push rsi
push rdi
push rbp
push rbx
sub rsp, 0x148
mov rax, qword [rcx]
mov rsi, qword [rax]
mov rax, qword [rsi]
mov r14d, 7
cmp byte [rax + 0x67], 0
jne 0x502ba9
mov rdi, r8
mov r13, rdx
mov qword [rsp + 0x60], rax
mov r15, qword [rcx + 0x10]
mov edx, dword [r15 + 0x38]
mov eax, edx
xor eax, 0xffffffdf
mov dword [rsp + 0x6c], edx
test eax, edx
mov eax, 0x1bf
mov ebp, 0x18
cmove ebp, eax
mov eax, dword [r8 + 0x64]
mov edx, eax
xor edx, 0xfffffffb
mov ebx, ebp
and ebx, 0xffffff83
test edx, eax
cmove ebx, ebp
movzx ebp, word [r15 + 0x18]
movzx eax, word [r15 + 0x1a]
mov word [rsp + 0x54], ax
movzx eax, word [r15 + 0x1c]
mov word [rsp + 0x52], ax
movzx r10d, word [r15 + 0x3e]
movzx r14d, word [r15 + 0x3c]
mov rax, qword [r15]
mov qword [rsp + 0xd0], rax
movzx r8d, word [r15 + 0x16]
mov rax, qword [rcx + 8]
mov edx, dword [r13 + 0x44]
mov qword [rsp + 0xd8], rax
mov qword [rsp + 0xe0], rax
mov byte [rsp + 0x100], 0
xorps xmm0, xmm0
movups xmmword [rsp + 0xe8], xmm0
mov dword [rsp + 0xfc], ebx
movzx eax, bp
mov qword [rsp + 0x40], rax
mov dword [rsp + 0xf8], 0
mov dword [rsp + 0x104], edx
mov word [rsp + 0x101], 0x101
mov eax, ebp
test rdi, rdi
mov qword [rsp + 0x88], rcx
mov qword [rsp + 0x38], r9
mov word [rsp + 0x36], bp
mov dword [rsp + 0x70], r8d
mov qword [rsp + 0xb0], rsi
mov word [rsp + 0x76], r10w
je 0x501ac4
mov rax, qword [rdi + 8]
mov rdx, qword [rdi + 0x18]
mov rcx, qword [rsp + 0x40]
movzx ebx, word [rax + rcx*2]
mov ax, 0xffff
cmp bx, word [rdx + 0x34]
je 0x501ac4
test bx, bx
js 0x501a76
movzx ecx, bx
mov rdx, qword [rdx + 8]
lea rcx, [rcx + rcx*2]
mov cl, byte [rdx + rcx*8 + 0xc]
mov byte [rsp + 0x100], cl
mov rcx, qword [rdi + 0x40]
mov rax, qword [rsp + 0x40]
mov rcx, qword [rcx + rax*8]
mov qword [rsp + 0xe8], rcx
mov eax, ebx
jmp 0x501ac4
mov eax, ebx
cmp bx, 0xfffe
jne 0x501ac4
mov rax, qword [rdi + 0x50]
mov rdx, qword [rsp + 0x40]
mov rcx, rdx
shl rcx, 5
mov rax, qword [rax + rcx + 8]
mov qword [rsp + 0xf0], rax
mov rax, qword [rdi + 0x40]
mov rax, qword [rax + rdx*8]
mov qword [rsp + 0xe8], rax
mov word [rsp + 0x130], 0xfffe
lea rcx, [rsp + 0xd8]
call fcn.004fd1a0
jmp 0x501ad9
mov word [rsp + 0x130], ax
lea rcx, [rsp + 0xd8]
call fcn.004fcd00
mov rbp, rax
mov word [rsp + 0x56], r14w
movzx eax, r14w
mov word [r15 + 0x12], 0
mov rcx, qword [rdi + 0x10]
movzx ecx, word [rcx]
xor r14d, r14d
mov r12d, 0
mov qword [rsp + 0x98], rcx
cmp cx, 0xb
jl 0x501b88
mov r12w, 0x28
mov rdx, qword [rsp + 0x98]
mov rcx, rdx
cmp edx, 0x100
jb 0x501b54
mov r12w, 0x28
mov rdx, qword [rsp + 0x98]
mov rcx, rdx
nop dword [rax + rax]
add r12d, 0x28
shr rcx, 4
cmp rdx, 0xfff
mov rdx, rcx
ja 0x501b40
cmp rcx, 0x10
jb 0x501b72
mov rdx, rcx
nop dword [rax]
shr rdx, 1
add r12d, 0xa
cmp rcx, 0x1f
mov rcx, rdx
ja 0x501b60
jmp 0x501b75
mov rdx, rcx
and edx, 7
lea rcx, [0x00607550]
add r12w, word [rcx + rdx*2]
add r12d, 0xffffffd5
add eax, 8
mov ecx, eax
xor ecx, 7
and ecx, eax
mov qword [rsp + 0xc0], rcx
lea eax, [rcx*8]
mov qword [rsp + 0xc8], rax
test rbp, rbp
mov qword [rsp + 0x48], rdi
je 0x50297f
lea rax, [r15 + 0x58]
mov qword [rsp + 0xb8], rax
movzx eax, r12w
mov ecx, 0xa
sub ecx, eax
mov dword [rsp + 0xa8], ecx
cwde
lea ecx, [r12 + 1]
mov dword [rsp + 0xa4], ecx
lea ecx, [rax + 0x31]
mov dword [rsp + 0xac], ecx
mov qword [rsp + 0x80], rax
add eax, 0x1f
mov dword [rsp + 0xa0], eax
mov bl, 1
xor eax, eax
mov qword [rsp + 0x58], rax
xor eax, eax
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x78], r13
nop word cs:[rax + rax]
movzx esi, word [rbp + 0x14]
cmp esi, 0x100
je 0x501c32
cmp byte [rbp + 0x12], 0
jns 0x501c90
mov rax, qword [rdi + 8]
mov rcx, qword [rsp + 0x40]
movzx ecx, word [rax + rcx*2]
test cx, cx
js 0x501c70
mov rax, qword [rdi + 0x18]
mov rax, qword [rax + 8]
lea rcx, [rcx + rcx*2]
mov ecx, dword [rax + rcx*8 + 8]
mov eax, ecx
xor eax, 0xfffffff0
and eax, ecx
xor r14d, r14d
test eax, eax
jne 0x502820
jmp 0x501c90
xor eax, eax
cmp cx, 0xffff
sete al
xor r14d, r14d
test eax, eax
jne 0x502820
nop word cs:[rax + rax]
nop
mov rax, qword [r15 + 8]
mov rcx, qword [rbp + 0x28]
xor rcx, rax
not rcx
xor r14d, r14d
test rcx, rax
jne 0x502820
movzx ecx, word [rbp + 0x12]
not ecx
or ecx, 0xfeff
cmp cx, 0xffff
sete cl
cmp si, 0x10
sete dl
cmp dl, cl
je 0x501cd2
cmp si, 0x10
je 0x502820
mov cl, byte [r13 + 0x3c]
not cl
or cl, 0xa7
cmp cl, 0xff
je 0x501d02
mov rcx, qword [rbp]
mov edx, dword [rcx + 4]
not edx
or edx, 0xfffffffc
cmp edx, 0xffffffff
je 0x502820
mov ecx, dword [rcx + 0x34]
cmp ecx, dword [r13 + 0x44]
jne 0x502820
cmp byte [rdi + 0x62], 0
je 0x501d17
movzx edx, word [rdi + 0x5e]
add edx, 0xffffffff
mov cl, 2
cmp edx, dword [rsp + 0x40]
je 0x501d19
mov cl, 1
mov rdi, qword [rsp + 0x88]
mov dl, byte [rdi + 0x20]
mov ebx, edx
and bl, cl
xor dl, cl
or dl, bl
mov byte [rdi + 0x20], dl
mov ecx, dword [rsp + 0x6c]
mov dword [r15 + 0x38], ecx
movzx ecx, word [rsp + 0x36]
mov word [r15 + 0x18], cx
movzx ecx, word [rsp + 0x54]
mov word [r15 + 0x1a], cx
movzx ecx, word [rsp + 0x52]
mov word [r15 + 0x1c], cx
movzx ecx, word [rsp + 0x56]
mov word [r15 + 0x3c], cx
cmp cx, word [r15 + 0x40]
mov r11d, 0
mov r14, qword [rsp + 0x90]
jae 0x501d7f
mov rdi, qword [r15 + 0x48]
mov edx, ecx
jmp 0x501eeb
mov rbx, qword [rsp + 0x60]
mov rcx, rbx
mov rdx, qword [rsp + 0xc8]
call fcn.00429840
test rax, rax
je 0x502977
mov rdi, rax
mov rdx, qword [r15 + 0x48]
movzx r8d, word [r15 + 0x40]
shl r8, 3
mov rcx, rax
call fcn.005f4c20
mov r14, qword [r15 + 0x48]
cmp r14, qword [rsp + 0xb8]
je 0x501ec6
test rbx, rbx
je 0x501e09
cmp qword [rbx + 0x300], 0
je 0x501de6
mov rcx, rbx
mov rdx, r14
call fcn.004297f0
jmp 0x501ec6
cmp qword [rbx + 0x1f0], r14
jbe 0x501e09
cmp qword [rbx + 0x1e0], r14
jbe 0x501ea2
cmp qword [rbx + 0x1e8], r14
jbe 0x501eb5
test r14, r14
je 0x501ec6
cmp dword [0x005f6010], 0
je 0x501e97
mov rcx, qword [0x0213b0e8]
test rcx, rcx
je 0x501e2d
call qword [0x005f6090]
mov rcx, r14
call qword [0x005f6048]
cdqe
mov rcx, qword [0x0213b040]
movabs rdx, 0x3e5db7083a947723
add rcx, rdx
sub rcx, rax
sub rcx, rdx
mov qword [0x0213b040], rcx
movabs rcx, 0x9447935e8fcd512b
mov rax, rcx
not rax
add rax, qword [0x0213b088]
add rax, rcx
mov qword [0x0213b088], rax
mov rcx, r14
call qword [0x005f6038]
mov rcx, qword [0x0213b0e8]
test rcx, rcx
je 0x501ec6
call qword [0x005f60a0]
jmp 0x501ec6
mov rcx, r14
call qword [0x005f6038]
jmp 0x501ec6
mov rax, qword [rbx + 0x1d8]
mov qword [r14], rax
mov qword [rbx + 0x1d8], r14
jmp 0x501ec6
mov rax, qword [rbx + 0x1c8]
mov qword [r14], rax
mov qword [rbx + 0x1c8], r14
mov qword [r15 + 0x48], rdi
mov rax, qword [rsp + 0xc0]
mov word [r15 + 0x40], ax
movzx edx, word [r15 + 0x3c]
mov rax, qword [r15 + 8]
xor r11d, r11d
mov r14, qword [rsp + 0x90]
lea ecx, [rdx + 1]
mov word [r15 + 0x3c], cx
movzx edx, dx
mov qword [rdi + rdx*8], rbp
mov rdx, qword [rbp + 0x28]
mov rbx, rdx
mov rdi, qword [rsp + 0xd0]
and rbx, rdi
xor rdx, rdi
or rdx, rbx
not rdx
or rdx, rax
movabs rbx, 0xba6c861bbd71c496
mov rax, rbx
not rax
or rax, rbx
not rdx
and rdx, rax
mov qword [r15], rdx
mov r10d, esi
not r10d
mov eax, r10d
or eax, 0xfffffffe
cmp eax, 0xffffffff
je 0x501fcf
mov r9, qword [rbp]
mov ebx, dword [r9 + 4]
mov edx, ebx
xor edx, 0xffffefff
test edx, ebx
je 0x50207f
mov r13d, 0x2e
cmp cx, 2
jb 0x502247
mov dword [rsp + 0x30], r10d
movzx r8d, cx
mov eax, 0xffffffff
add r8, rax
mov rcx, qword [r15 + 0x48]
mov r10, r8
xor r10, rax
not r10
and r10, r8
and r8d, 1
cmp r10, 1
jne 0x5020e5
mov r13d, 0x2e
xor edi, edi
test r8, r8
mov r10d, dword [rsp + 0x30]
je 0x502247
mov rcx, qword [rcx + rdi*8]
test rcx, rcx
je 0x502247
cmp qword [rcx], r9
cmove r13d, r11d
jmp 0x502247
mov eax, esi
xor eax, 0xff7d
test eax, esi
je 0x5020b4
mov rdi, qword [rsp + 0x48]
mov rax, qword [rdi + 8]
mov rcx, qword [rsp + 0x40]
movzx edx, word [rax + rcx*2]
mov ebx, dword [r15 + 0x38]
mov eax, ebx
and eax, 1
mov ecx, ebx
xor ecx, 1
or ecx, eax
mov dword [r15 + 0x38], ecx
cmp dx, 0xffff
mov r9, qword [rsp + 0x38]
je 0x502043
test r9w, r9w
sete al
test dx, dx
sets dl
cmp al, dl
je 0x502058
test r9w, r9w
jne 0x502058
movzx edx, word [rdi + 0x5e]
lea eax, [rdx - 1]
cmp eax, dword [rsp + 0x40]
jne 0x502058
mov eax, dword [rdi + 0x64]
mov ecx, eax
xor ecx, 0xfffffff7
test ecx, eax
je 0x502483
mov eax, ebx
and eax, 0x1001
xor ebx, 0x1001
or ebx, eax
mov dword [r15 + 0x38], ebx
mov ecx, ebx
xor r13d, r13d
cmp byte [rsp + 0x101], 2
jb 0x5020de
mov eax, ecx
and eax, 0x200000
xor ecx, 0x200000
or ecx, eax
mov dword [r15 + 0x38], ecx
mov bl, 1
jmp 0x502355
mov rax, qword [r9 + 0x20]
xor r13d, r13d
test rax, rax
je 0x502247
movsxd rdi, dword [rax]
test rdi, rdi
je 0x502247
cmp edi, 8
jae 0x5021be
cmp edi, 2
jae 0x5021f5
xor eax, eax
jmp 0x502243
mov eax, esi
xor eax, 0xfeff
mov ecx, dword [r15 + 0x38]
test eax, esi
mov r8, qword [rsp + 0x48]
mov r9, qword [rsp + 0x38]
je 0x502142
mov eax, ecx
and eax, 8
xor ecx, 8
or ecx, eax
mov dword [r15 + 0x38], ecx
xor r13d, r13d
mov bl, 1
jmp 0x502355
sub r10, r8
mov r13d, 0x2e
xor edi, edi
mov rdx, r10
jmp 0x502111
add rdi, 2
add rdx, 0xfffffffffffffffe
cmp r10, rdi
je 0x501fa8
mov rbx, qword [rcx + rdi*8]
test rbx, rbx
je 0x502121
cmp qword [rbx], r9
cmove r13d, r11d
mov esi, edi
and esi, 1
mov rax, rdi
xor rax, 1
or rax, rsi
mov rbx, qword [rcx + rax*8]
test rbx, rbx
je 0x502100
cmp qword [rbx], r9
cmove r13d, r11d
jmp 0x502100
mov dword [rsp + 0x30], r10d
mov eax, esi
xor eax, 0xffdb
test eax, esi
mov bl, 1
mov eax, ecx
je 0x502419
and eax, 0x22
xor ecx, 0x22
or ecx, eax
mov dword [r15 + 0x38], ecx
mov edx, dword [r13 + 0x44]
mov qword [rsp + 0x20], rbp
mov rcx, qword [rsp + 0xb0]
mov r9, qword [rsp + 0x40]
call fcn.00502d10
mov word [r15 + 0x1a], ax
movzx eax, word [rbp + 0x12]
mov ecx, eax
xor ecx, 0xfeff
test cx, ax
je 0x5024b1
movzx eax, word [r15 + 0x3c]
cmp ax, word [r15 + 0x40]
jae 0x5024d1
mov rdi, qword [r15 + 0x48]
mov r9, qword [rsp + 0x38]
mov r10d, dword [rsp + 0x30]
jmp 0x502912
mov ax, 0x28
cmp edi, 0x100
jb 0x502212
mov ax, 0x28
mov rcx, rdi
nop word cs:[rax + rax]
nop
add eax, 0x28
shr rcx, 4
cmp rdi, 0xfff
mov rdi, rcx
ja 0x5021e0
jmp 0x502215
mov ax, 0x28
nop dword [rax]
add eax, 0xfffffff6
lea rdx, [rdi + rdi]
cmp rdi, 4
mov rdi, rdx
jb 0x502200
jmp 0x502232
mov rcx, rdi
mov rdx, rcx
cmp rcx, 0x10
jb 0x502232
nop
mov rdx, rcx
shr rdx, 1
add eax, 0xa
cmp rcx, 0x1f
mov rcx, rdx
ja 0x502220
and edx, 7
lea rcx, [0x00607550]
add ax, word [rcx + rdx*2]
add eax, 0xfffffff6
movzx r13d, ax
cmp r12w, 9
setg al
cmp r12w, 0xa
setl dl
mov rdi, qword [rsp + 0x48]
cmp byte [rdi + 0x64], 0
sets cl
setns bl
xor bl, dl
mov r9, qword [rsp + 0x38]
mov bl, 1
jne 0x50232f
or cl, al
xor cl, 1
jne 0x50232f
mov rax, qword [rdi + 0x10]
mov rcx, qword [rsp + 0x40]
movzx eax, word [rax + rcx*2]
cmp r13w, 0xb
jge 0x50229b
xor ecx, ecx
jmp 0x50231a
mov edi, r13d
xor edi, 0xffff0000
and edi, r13d
movzx edx, r13w
mov cx, 0x28
cmp edx, 0x100
jb 0x5022d5
mov cx, 0x28
mov rbx, rdi
nop
add ecx, 0x28
shr rbx, 4
cmp rdi, 0xfff
mov rdi, rbx
ja 0x5022c0
jmp 0x5022d8
mov rbx, rdi
cmp rbx, 0x10
jb 0x5022f2
nop
mov rdx, rbx
shr rdx, 1
add ecx, 0xa
cmp rbx, 0x1f
mov rbx, rdx
ja 0x5022e0
mov rdx, rbx
movabs rdi, 0x7ffffffffffffff8
xor rdx, rdi
and rdx, rbx
lea rbx, [0x00607550]
add cx, word [rbx + rdx*2]
add ecx, 0xffffffd5
mov rdi, qword [rsp + 0x48]
mov bl, 1
mov edx, dword [rsp + 0xa8]
sub edx, r13d
add eax, edx
add ax, cx
js 0x5023cf
mov ecx, dword [r15 + 0x38]
mov eax, ecx
not eax
and eax, 0x26c8dd70
mov edx, ecx
and edx, 0xd937228f
or edx, eax
xor edx, 0x26c8dd74
and ecx, 4
or ecx, edx
mov dword [r15 + 0x38], ecx
mov eax, ecx
not eax
or eax, 0xfffffffd
cmp eax, 0xffffffff
je 0x5025d6
movzx eax, word [r15 + 0x16]
mov edi, eax
test r14, r14
mov rbp, qword [rsp + 0x58]
je 0x50238b
movzx edx, word [r14 + 0x10]
test dx, dx
jle 0x5023b7
lea edi, [rax - 0x14]
cmp byte [r14 + 0x12], 0
cmovs edi, eax
test rbp, rbp
je 0x5023bf
movzx edx, word [rbp + 0x10]
test dx, dx
jle 0x50257e
lea edx, [rdi - 0x14]
cmp byte [rbp + 0x12], 0
cmovs edx, edi
mov edi, edx
test r14, r14
jne 0x502585
jmp 0x5025a3
lea edi, [rax + rdx]
test rbp, rbp
jne 0x502390
xor ebp, ebp
test r14, r14
jne 0x502585
jmp 0x5025a3
xor r14d, r14d
cmp r9w, 1
jg 0x502818
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x60]
mov ecx, eax
xor ecx, 0xfffdffff
test ecx, eax
jne 0x502818
mov eax, dword [r15 + 0x38]
mov ecx, eax
and ecx, 0x100000
xor eax, 0x100000
or eax, ecx
mov dword [r15 + 0x38], eax
mov r14, qword [rsp + 0x90]
jmp 0x50232f
and eax, 0x12
xor ecx, 0x12
or ecx, eax
mov dword [r15 + 0x38], ecx
mov edx, dword [r13 + 0x44]
mov qword [rsp + 0x20], rbp
mov rcx, qword [rsp + 0xb0]
mov r9, qword [rsp + 0x40]
call fcn.00502d10
mov word [r15 + 0x1c], ax
mov ecx, dword [r15 + 0x38]
mov eax, ecx
xor eax, 0xffffffdf
test eax, ecx
je 0x502551
mov rax, qword [r15 + 0x48]
movzx edx, word [r15 + 0x3c]
movabs rbx, 0x6691eaf68ca7f262
sub rdx, rbx
add rdx, rbx
add rdx, 0xfffffffffffffffe
mov bl, 1
mov r14, qword [rax + rdx*8]
xor r13d, r13d
mov qword [rsp + 0x58], rbp
jmp 0x5024c2
cmp dx, 1
jne 0x50249f
cmp si, 2
jne 0x50249f
cmp byte [rdi + 0x62], 0
je 0x50249f
mov al, 1
test al, al
jne 0x502043
mov eax, ebx
and eax, 0x10001
xor ebx, 0x10001
jmp 0x502050
mov ecx, dword [r15 + 0x38]
xor r13d, r13d
mov r14, rbp
xor eax, eax
mov qword [rsp + 0x58], rax
mov r9, qword [rsp + 0x38]
mov r10d, dword [rsp + 0x30]
jmp 0x502355
movzx esi, ax
add esi, 8
and esi, 0xfffffff8
lea edx, [rsi*8]
mov rcx, qword [rsp + 0x60]
call fcn.00429840
test rax, rax
je 0x502977
mov rdi, rax
mov rdx, qword [r15 + 0x48]
movzx r8d, word [r15 + 0x40]
shl r8, 3
mov rcx, rax
call fcn.005f4c20
mov r14, qword [r15 + 0x48]
cmp r14, qword [rsp + 0xb8]
mov r9, qword [rsp + 0x38]
mov r10d, dword [rsp + 0x30]
je 0x502904
mov rcx, qword [rsp + 0x60]
test rcx, rcx
je 0x502872
cmp qword [rcx + 0x300], 0
je 0x50284f
mov rdx, r14
call fcn.004297f0
jmp 0x5028fa
mov eax, ecx
xor eax, 0xfffffffd
test eax, ecx
mov r9, qword [rsp + 0x38]
mov r10d, dword [rsp + 0x30]
je 0x5025cb
movzx edi, word [r15 + 0x16]
xor r14d, r14d
xor r13d, r13d
mov eax, edi
movzx edx, word [rbp + 0x10]
test dx, dx
jg 0x50239d
add edi, edx
test r14, r14
je 0x5025a3
test rbp, rbp
je 0x5025a3
cmp word [r14 + 0x10], 0
jle 0x5025a3
test bl, bl
je 0x5025a3
lea edx, [rdi - 0x14]
cmp word [rbp + 0x10], 0
cmovle edx, edi
mov edi, edx
mov rdx, rbp
neg rdx
sbb edx, edx
cwde
cmp r14, 1
adc edx, 0xffffffff
add edx, eax
cmp di, 9
mov eax, 0xa
cmovle edi, eax
movzx eax, di
cmp edx, eax
cmovle edi, edx
jmp 0x502643
xor r14d, r14d
mov qword [rsp + 0x58], rbp
xor r13d, r13d
mov eax, dword [r15 + 0x18]
add eax, 1
mov word [r15 + 0x18], ax
movzx edi, word [rbp + 0x10]
test di, di
jle 0x502621
movzx eax, ax
mov rdx, qword [rsp + 0x48]
mov rdx, qword [rdx + 0x10]
movzx edi, word [rdx + rax*2]
sub di, word [rdx + rax*2 - 2]
add di, word [r15 + 0x16]
mov word [r15 + 0x16], di
or r10d, 0xfffffeff
cmp r10d, 0xffffffff
mov rbp, qword [rsp + 0x58]
je 0x50264d
add edi, 0xa
jmp 0x502643
mov rdx, qword [rsp + 0x48]
mov rdx, qword [rdx + 8]
mov rbp, qword [rsp + 0x40]
cmp word [rdx + rbp*2], 0
js 0x5025eb
sub edi, r13d
add di, word [r15 + 0x16]
mov rbp, qword [rsp + 0x58]
mov word [r15 + 0x16], di
mov qword [rsp + 0x58], rbp
movzx ebp, di
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x20]
movsx ebx, word [rax + 0x3c]
mov rax, qword [rsp + 0x48]
movsx eax, word [rax + 0x5c]
lea eax, [rax + rax*4]
lea eax, [rax + rax*2]
cdq
idiv ebx
add eax, ebp
add eax, 1
movsx edx, ax
cmp r12w, dx
jge 0x50268a
cmp dword [rsp + 0xac], edx
jge 0x5026ca
mov bl, 1
jmp 0x5026f4
lea ebp, [rdx + 0x31]
mov eax, r12d
cmp ebp, dword [rsp + 0x80]
mov bl, 1
jl 0x5026f4
lea ebp, [rdx + 0x1f]
mov eax, dword [rsp + 0xa4]
cmp ebp, dword [rsp + 0x80]
jl 0x5026f4
mov rax, qword [rsp + 0x80]
sub eax, edx
cdqe
lea rdx, [0x00604380]
movzx eax, byte [rax + rdx]
add eax, r12d
jmp 0x5026f4
cmp dword [rsp + 0xa0], edx
mov bl, 1
jge 0x5026da
add eax, 1
jmp 0x5026f4
mov eax, edx
sub eax, dword [rsp + 0x80]
cdqe
lea rbp, [0x00604380]
movzx eax, byte [rax + rbp]
add edx, eax
mov eax, edx
mov word [r15 + 0x14], ax
not ecx
or ecx, 0xfffffebf
cmp ecx, 0xffffffff
mov qword [rsp + 0x90], r14
jne 0x502774
lea ebp, [rdi + 0x10]
movsx edx, ax
movsx ecx, bp
cmp ax, cx
jge 0x50272f
lea eax, [rdx + 0x31]
cmp eax, ecx
jl 0x50276d
lea eax, [rdx + 0x1f]
cmp eax, ecx
jge 0x502742
lea ebp, [rdi + 0x11]
jmp 0x50276d
lea ebp, [rcx + 0x31]
cmp ebp, edx
jl 0x50276b
lea ebp, [rcx + 0x1f]
cmp ebp, edx
jge 0x502759
add eax, 1
jmp 0x50276b
mov eax, ecx
sub eax, edx
cdqe
lea rdx, [0x00604380]
movzx eax, byte [rax + rdx]
add ecx, eax
mov ebp, ecx
jmp 0x50276d
sub edx, ecx
movsxd rcx, edx
lea rdx, [0x00604380]
movzx ecx, byte [rcx + rdx]
add eax, ecx
mov ebp, eax
mov word [r15 + 0x14], bp
mov eax, ebp
add r13d, r9d
add eax, r13d
mov word [r15 + 0x14], ax
lea eax, [rdi + r13]
mov word [r15 + 0x16], ax
mov rsi, qword [rsp + 0x88]
mov rcx, qword [rsi + 8]
mov rdx, r15
mov r8, qword [rsp + 0x98]
call fcn.00501660
mov rcx, rsi
mov rdx, r15
call fcn.00500520
mov ecx, dword [r15 + 0x38]
not ecx
mov edx, ecx
or edx, 0xfffffffd
cmp edx, 0xffffffff
cmovne edi, dword [rsp + 0x70]
mov r14d, eax
mov word [r15 + 0x16], di
or ecx, 0xffffffef
cmp ecx, 0xffffffff
mov rdi, qword [rsp + 0x48]
jne 0x50280f
movzx eax, word [r15 + 0x18]
cmp ax, word [rdi + 0x60]
jae 0x50280f
cmp ax, word [rdi + 0x5e]
jb 0x5027f7
mov eax, dword [rdi + 0x64]
mov ecx, eax
xor ecx, 0xfffffffc
and ecx, eax
cmp ecx, 2
je 0x50280f
mov rcx, qword [rsp + 0x88]
mov rdx, qword [rsp + 0x78]
mov r8, rdi
mov r9d, r13d
call fcn.00501900
mov eax, dword [rsp + 0x70]
mov word [r15 + 0x16], ax
mov r13, qword [rsp + 0x78]
nop dword [rax]
lea rcx, [rsp + 0xd8]
call fcn.004fcd00
test r14d, r14d
jne 0x50297f
mov rbp, rax
test rax, rax
je 0x50297f
test bl, bl
jne 0x501c20
jmp 0x50297f
cmp qword [rcx + 0x1f0], r14
jbe 0x502872
cmp qword [rcx + 0x1e0], r14
jbe 0x502951
cmp qword [rcx + 0x1e8], r14
jbe 0x502964
test r14, r14
je 0x502904
cmp dword [0x005f6010], 0
je 0x5028f1
mov rcx, qword [0x0213b0e8]
test rcx, rcx
je 0x502896
call qword [0x005f6090]
mov rcx, r14
call qword [0x005f6048]
cdqe
mov rcx, qword [0x0213b040]
movabs rdx, 0x5e3d20b5f0a783fe
add rcx, rdx
sub rcx, rax
sub rcx, rdx
mov qword [0x0213b040], rcx
add qword [0x0213b088], 0xffffffffffffffff
mov rcx, r14
call qword [0x005f6038]
mov rcx, qword [0x0213b0e8]
test rcx, rcx
mov r9, qword [rsp + 0x38]
mov r10d, dword [rsp + 0x30]
je 0x502904
call qword [0x005f60a0]
jmp 0x5028fa
mov rcx, r14
call qword [0x005f6038]
mov r10d, dword [rsp + 0x30]
mov r9, qword [rsp + 0x38]
mov qword [r15 + 0x48], rdi
mov word [r15 + 0x40], si
movzx eax, word [r15 + 0x3c]
lea rdx, [rbp + 0x38]
lea ecx, [rax + 1]
mov word [r15 + 0x3c], cx
movzx eax, ax
mov rcx, rdx
mov qword [rsp + 0x58], rdx
mov qword [rdi + rax*8], rdx
mov ecx, dword [r15 + 0x38]
mov eax, ecx
and eax, 0x10
xor ecx, 0x10
or ecx, eax
mov dword [r15 + 0x38], ecx
mov word [r15 + 0x1c], 1
xor r13d, r13d
mov r14, rbp
jmp 0x502355
mov rax, qword [rcx + 0x1d8]
mov qword [r14], rax
mov qword [rcx + 0x1d8], r14
jmp 0x502904
mov rax, qword [rcx + 0x1c8]
mov qword [r14], rax
mov qword [rcx + 0x1c8], r14
jmp 0x502904
xor r14d, r14d
mov rdi, qword [rsp + 0x48]
mov rax, qword [rsp + 0xd0]
mov qword [r15], rax
movzx ebx, word [rsp + 0x36]
mov word [r15 + 0x18], bx
movzx eax, word [rsp + 0x54]
mov word [r15 + 0x1a], ax
movzx eax, word [rsp + 0x52]
mov word [r15 + 0x1c], ax
movzx eax, word [rsp + 0x76]
mov word [r15 + 0x3e], ax
mov ebp, dword [rsp + 0x6c]
mov dword [r15 + 0x38], ebp
mov esi, dword [rsp + 0x70]
mov word [r15 + 0x16], si
movzx edx, word [rsp + 0x56]
mov word [r15 + 0x3c], dx
cmp bx, ax
jne 0x502ba9
mov rax, qword [rsp + 0x40]
add eax, 1
movzx ecx, word [rdi + 0x5e]
cmp eax, ecx
jae 0x502ba9
cmp bx, dx
jne 0x502ba9
mov cl, 1
test cl, cl
je 0x502ba9
mov ecx, dword [rdi + 0x64]
mov edx, ecx
xor edx, 0xffffff3f
and edx, ecx
cmp edx, 0x80
jne 0x502ba9
mov rcx, qword [rsp + 0x60]
mov ecx, dword [rcx + 0x60]
not ecx
or ecx, 0xffffbfff
cmp ecx, 0xffffffff
jne 0x502ba9
mov rcx, rdi
mov edi, eax
mov rax, qword [rcx + 0x10]
cmp word [rax + rdi*2], 0x2a
jl 0x502ba9
movzx r12d, word [rsp + 0x36]
cmp r12w, word [r15 + 0x40]
jae 0x502a6f
mov rcx, qword [r15 + 0x48]
mov r14d, esi
mov eax, r14d
mov ebx, ebp
mov edx, r12d
mov esi, r12d
mov ebp, r12d
mov r9, qword [rsp + 0x38]
jmp 0x502b12
mov rcx, qword [rsp + 0x60]
mov rdx, qword [rsp + 0xc8]
call fcn.00429840
mov r14d, 7
test rax, rax
je 0x502ba9
mov r12d, esi
mov rdx, qword [r15 + 0x48]
movzx r8d, word [r15 + 0x40]
shl r8, 3
mov rbx, rax
mov rcx, rax
call fcn.005f4c20
mov rsi, qword [r15 + 0x48]
lea rax, [r15 + 0x58]
cmp rsi, rax
mov r9, qword [rsp + 0x38]
je 0x502add
mov rcx, qword [rsp + 0x60]
cmp qword [rcx + 0x300], 0
je 0x502bc0
mov rdx, rsi
call fcn.004297f0
mov r9, qword [rsp + 0x38]
mov rcx, rbx
mov qword [r15 + 0x48], rbx
mov rax, qword [rsp + 0xc0]
mov word [r15 + 0x40], ax
movzx eax, word [r15 + 0x16]
movzx ebp, word [r15 + 0x18]
movzx esi, word [r15 + 0x3e]
movzx edx, word [r15 + 0x3c]
mov ebx, dword [r15 + 0x38]
mov r14d, r12d
movzx r12d, word [rsp + 0x36]
add ebp, 1
mov word [r15 + 0x18], bp
add esi, 1
mov word [r15 + 0x3e], si
lea ebp, [rdx + 1]
mov word [r15 + 0x3c], bp
movzx edx, dx
mov qword [rcx + rdx*8], 0
mov edx, ebx
not edx
and edx, 0x894f3f2a
mov ecx, ebx
and ecx, 0x76b0c0d5
or ecx, edx
xor ecx, 0x894fbf2a
and ebx, 0x8000
or ebx, ecx
mov dword [r15 + 0x38], ebx
mov r8, qword [rsp + 0x48]
mov rcx, qword [r8 + 0x10]
mov rdx, qword [rsp + 0x40]
movzx edx, word [rcx + rdx*2]
sub dx, word [rcx + rdi*2]
sub eax, edx
mov word [r15 + 0x16], ax
add r9d, edx
add r9d, 5
mov rcx, qword [rsp + 0x88]
mov rdx, r13
call fcn.00501900
mov word [r15 + 0x16], r14w
mov word [r15 + 0x18], r12w
mov word [r15 + 0x3e], r12w
mov eax, dword [rsp + 0x6c]
mov dword [r15 + 0x38], eax
xor r14d, r14d
mov eax, r14d
add rsp, 0x148
pop rbx
pop rbp
pop rdi
pop rsi
pop r12
pop r13
pop r14
pop r15
ret
cmp qword [rcx + 0x1f0], rsi
jbe 0x502be3
cmp qword [rcx + 0x1e0], rsi
jbe 0x502c68
cmp qword [rcx + 0x1e8], rsi
jbe 0x502c8c
test rsi, rsi
je 0x502add
cmp dword [0x005f6010], 0
je 0x502c7e
mov rcx, qword [0x0213b0e8]
test rcx, rcx
je 0x502c0b
call qword [0x005f6090]
mov rcx, rsi
call qword [0x005f6048]
mov rcx, qword [0x0213b040]
cdqe
movabs rdx, 0x36ce2a137538c1cc
sub rcx, rdx
sub rcx, rax
add rcx, rdx
mov qword [0x0213b040], rcx
add qword [0x0213b088], 0xffffffffffffffff
mov rcx, rsi
call qword [0x005f6038]
mov rcx, qword [0x0213b0e8]
test rcx, rcx
mov r9, qword [rsp + 0x38]
je 0x502add
call qword [0x005f60a0]
jmp 0x502ad8
mov rax, qword [rcx + 0x1d8]
mov qword [rsi], rax
mov qword [rcx + 0x1d8], rsi
jmp 0x502add
mov rcx, rsi
call qword [0x005f6038]
jmp 0x502ad8
mov rax, qword [rcx + 0x1c8]
mov qword [rsi], rax
mov qword [rcx + 0x1c8], rsi
jmp 0x502add