Function at 0x476e20
Capabilities:
Access peb ldr_data

Disassembly:
lea r12, [rsp - 0x28]
cmp r12, qword [r14 + 0x10]
jbe 0x4771f4
push rbp
mov rbp, rsp
sub rsp, 0xa0
mov qword [rsp + 0xb0], rax
test rbx, rbx
je 0x476e62
mov qword [rsp + 0xb8], rbx
mov qword [rsp + 0xb0], rax
mov rdx, rax
mov rcx, rbx
xor esi, esi
nop
jmp 0x476ec3
mov qword [rsp + 0x48], 0
lea rax, [rsp + 0x48]
mov ebx, 2
mov rcx, rbx
call fcn.00473a40
xor edi, edi
xor esi, esi
add rsp, 0xa0
pop rbp
ret
mov rax, qword [rsp + 0x98]
add rax, 0x10
mov rbx, qword [rsp + 0x80]
dec rbx
mov rdi, qword [rsp + 0x58]
mov r8, qword [rsp + 0x60]
lea rsi, [r8 + rdi]
lea rsi, [rsi + 1]
mov rcx, qword [rsp + 0xb8]
mov rdx, qword [rsp + 0xb0]
test rbx, rbx
jle 0x476f38
mov qword [rsp + 0x80], rbx
mov qword [rsp + 0x60], rsi
mov qword [rsp + 0x98], rax
mov rcx, qword [rax + 8]
mov qword [rsp + 0x58], rcx
mov rdx, qword [rax]
mov qword [rsp], rdx
mov qword [rsp + 8], rcx
mov byte [rsp + 0x10], 0
call fcn.00403900
xorps xmm15, xmm15
mov r14, qword [0x007ed4e0]
mov r14, qword gs:[r14]
mov r14, qword [r14]
cmp qword [rsp + 0x18], 0xffffffffffffffff
je 0x476e8a
xor eax, eax
xor ebx, ebx
mov rcx, rbx
lea rdi, [0x00506de8]
lea rsi, [0x005065d8]
add rsp, 0xa0
pop rbp
ret
lea rcx, [rsi + 1]
mov qword [rsp + 0x60], rcx
lea rax, [0x004c01a0]
xor ebx, ebx
call fcn.0044dcc0
mov rdx, qword [rsp + 0xb0]
mov rsi, qword [rsp + 0x60]
mov rdi, qword [rsp + 0xb8]
xor ecx, ecx
jmp 0x476f79
mov word [rax + rbx*2 - 2], 0
add rdx, 0x10
dec rdi
mov rcx, rbx
test rdi, rdi
jle 0x476fda
mov qword [rsp + 0x80], rdi
mov qword [rsp + 0x98], rdx
mov r8, qword [rdx]
mov qword [rsp + 0x88], r8
mov rbx, qword [rdx + 8]
mov qword [rsp + 0x50], rbx
xor r9d, r9d
jmp 0x477016
lea rbx, [rcx + 1]
nop
cmp rsi, rbx
jae 0x476f68
mov rcx, rsi
mov edi, 1
lea rsi, [0x004c01a0]
call fcn.0044dda0
mov rdx, qword [rsp + 0x98]
mov rdi, qword [rsp + 0x80]
mov rsi, rcx
jmp 0x476f68
lea rbx, [rcx + 1]
nop
nop
cmp rsi, rbx
jae 0x476ffc
mov rcx, rsi
mov edi, 1
lea rsi, [0x004c01a0]
call fcn.0044dda0
mov rsi, rcx
mov word [rax + rbx*2 - 2], 0
mov rcx, rsi
xor edi, edi
xor esi, esi
add rsp, 0xa0
pop rbp
ret
mov rcx, r11
cmp r9, rbx
jge 0x476fa7
movzx r10d, byte [r8 + r9]
cmp r10d, 0x80
jge 0x47702e
inc r9
jmp 0x477080
mov qword [rsp + 0x70], rsi
mov qword [rsp + 0x90], rax
mov qword [rsp + 0x68], rcx
mov rax, r8
mov rcx, r9
call fcn.00460fe0
mov rcx, qword [rsp + 0x68]
mov rdx, qword [rsp + 0x98]
mov rsi, qword [rsp + 0x70]
mov rdi, qword [rsp + 0x80]
mov r8, qword [rsp + 0x88]
mov r10d, eax
mov r9, rbx
mov rax, qword [rsp + 0x90]
mov rbx, qword [rsp + 0x50]
mov qword [rsp + 0x78], r9
cmp r10d, 0xd800
jb 0x47709e
lea r11d, [r10 - 0xe000]
cmp r11d, 0x2000
jae 0x4770fd
lea r11, [rcx + 1]
cmp rsi, r11
jae 0x4770f2
mov dword [rsp + 0x40], r10d
mov rbx, r11
mov rcx, rsi
mov edi, 1
lea rsi, [0x004c01a0]
nop
call fcn.0044dda0
mov rdx, qword [rsp + 0x98]
mov rdi, qword [rsp + 0x80]
mov r8, qword [rsp + 0x88]
mov r9, qword [rsp + 0x78]
mov r10d, dword [rsp + 0x40]
mov r11, rbx
mov rsi, rcx
mov rbx, qword [rsp + 0x50]
mov word [rax + r11*2 - 2], r10w
jmp 0x477013
add r10d, 0xffff0000
cmp r10d, 0xfffff
ja 0x477199
lea r11, [rcx + 2]
nop
cmp rsi, r11
jae 0x477164
mov dword [rsp + 0x44], r10d
mov rbx, r11
mov rcx, rsi
mov edi, 2
lea rsi, [0x004c01a0]
call fcn.0044dda0
mov rdx, qword [rsp + 0x98]
mov rdi, qword [rsp + 0x80]
mov r8, qword [rsp + 0x88]
mov r9, qword [rsp + 0x78]
mov r10d, dword [rsp + 0x44]
mov r11, rbx
mov rsi, rcx
mov rbx, qword [rsp + 0x50]
mov r12d, r10d
sar r10d, 0xa
and r10d, 0x3ff
add r10d, 0xd800
mov word [rax + r11*2 - 4], r10w
and r12d, 0x3ff
lea r10d, [r12 + 0xdc00]
mov word [rax + r11*2 - 2], r10w
jmp 0x477013
lea r10, [rcx + 1]
nop dword [rax]
cmp rsi, r10
jae 0x4771e4
mov rbx, r10
mov rcx, rsi
mov edi, 1
lea rsi, [0x004c01a0]
call fcn.0044dda0
mov rdx, qword [rsp + 0x98]
mov rdi, qword [rsp + 0x80]
mov r8, qword [rsp + 0x88]
mov r9, qword [rsp + 0x78]
mov r10, rbx
mov rsi, rcx
mov rbx, qword [rsp + 0x50]
mov word [rax + r10*2 - 2], 0xfffd
mov r11, r10
jmp 0x477013
mov qword [rsp + 8], rax
mov qword [rsp + 0x10], rbx
mov qword [rsp + 0x18], rcx
call fcn.00466ce0
mov rax, qword [rsp + 8]
mov rbx, qword [rsp + 0x10]
mov rcx, qword [rsp + 0x18]
jmp fcn.00476e20