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

Disassembly:
mov qword [rsp + 0x20], r9
mov qword [rsp + 0x18], r8
mov qword [rsp + 0x10], rdx
mov qword [rsp + 8], rcx
push rsi
push rdi
sub rsp, 0xb8
mov rax, qword [rsp + 0xd0]
movzx eax, byte [rax + 0xa]
mov dword [rsp + 0x38], eax
mov rax, qword [rsp + 0xd0]
movzx eax, byte [rax + 2]
test eax, eax
je 0x18005b9fa
mov rax, qword [rsp + 0xe0]
mov eax, dword [rax + 0x24]
mov rcx, qword [rsp + 0xe0]
add eax, dword [rcx + 0x28]
mov dword [rsp + 0x34], eax
mov rax, qword [rsp + 0xe0]
mov rax, qword [rax + 0x10]
mov qword [rsp + 0x68], rax
mov rax, qword [rsp + 0xe0]
mov eax, dword [rax + 0x24]
mov dword [rsp + 0x40], eax
cmp dword [rsp + 0x34], 0x80
jae 0x18005b987
movsxd rax, dword [rsp + 0x38]
mov rcx, qword [rsp + 0xd8]
movzx edx, byte [rsp + 0x34]
mov byte [rcx + rax], dl
mov dword [rsp + 0x88], 1
jmp 0x18005b9ae
movsxd rax, dword [rsp + 0x34]
movsxd rcx, dword [rsp + 0x38]
mov rdx, qword [rsp + 0xd8]
add rdx, rcx
mov rcx, rdx
mov rdx, rax
call fcn.18003a5c0
mov dword [rsp + 0x88], eax
movzx eax, byte [rsp + 0x88]
mov ecx, dword [rsp + 0x38]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x38], eax
movsxd rax, dword [rsp + 0x38]
mov rcx, qword [rsp + 0xd8]
add rcx, rax
mov rax, rcx
mov rcx, qword [rsp + 0xe0]
mov rdx, qword [rcx + 8]
mov rcx, rax
call fcn.18003a5c0
mov ecx, dword [rsp + 0x38]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x38], eax
jmp 0x18005ba7f
mov rax, qword [rsp + 0xe0]
mov eax, dword [rax + 8]
mov dword [rsp + 0x34], eax
mov eax, dword [rsp + 0x34]
mov dword [rsp + 0x40], eax
mov rax, qword [rsp + 0xe0]
mov rax, qword [rax]
mov qword [rsp + 0x68], rax
cmp dword [rsp + 0x34], 0x80
jae 0x18005ba4a
movsxd rax, dword [rsp + 0x38]
mov rcx, qword [rsp + 0xd8]
movzx edx, byte [rsp + 0x34]
mov byte [rcx + rax], dl
mov dword [rsp + 0x70], 1
jmp 0x18005ba6e
movsxd rax, dword [rsp + 0x34]
movsxd rcx, dword [rsp + 0x38]
mov rdx, qword [rsp + 0xd8]
add rdx, rcx
mov rcx, rdx
mov rdx, rax
call fcn.18003a5c0
mov dword [rsp + 0x70], eax
movzx eax, byte [rsp + 0x70]
mov ecx, dword [rsp + 0x38]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x38], eax
movsxd rax, dword [rsp + 0x38]
mov rcx, qword [rsp + 0xd8]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0xd0]
movzx eax, word [rax + 0xe]
cmp dword [rsp + 0x34], eax
jg 0x18005bb26
mov eax, dword [rsp + 0x34]
mov ecx, dword [rsp + 0x38]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x30], eax
cmp dword [rsp + 0x30], 4
jge 0x18005bac8
mov dword [rsp + 0x30], 4
mov rax, qword [rsp + 0xe8]
mov ecx, dword [rsp + 0x30]
mov dword [rax], ecx
movsxd rax, dword [rsp + 0x40]
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x68]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
mov eax, dword [rsp + 0x40]
mov ecx, dword [rsp + 0x34]
sub ecx, eax
mov eax, ecx
cdqe
mov qword [rsp + 0xa0], rax
movsxd rcx, dword [rsp + 0x40]
mov rdx, qword [rsp + 0x50]
add rdx, rcx
mov rcx, rdx
mov rdi, rcx
xor eax, eax
mov rcx, qword [rsp + 0xa0]
rep stosb byte [rdi], al
xor eax, eax
jmp 0x18005be74
mov rax, qword [rsp + 0xd0]
movzx eax, word [rax + 0x10]
mov dword [rsp + 0x58], eax
mov eax, dword [rsp + 0x58]
mov ecx, dword [rsp + 0x34]
sub ecx, eax
mov eax, ecx
mov rcx, qword [rsp + 0xd0]
mov rcx, qword [rcx + 0x48]
mov ecx, dword [rcx + 0x34]
sub ecx, 4
xor edx, edx
div ecx
mov eax, edx
mov ecx, dword [rsp + 0x58]
add ecx, eax
mov eax, ecx
mov dword [rsp + 0x30], eax
mov rax, qword [rsp + 0xd0]
movzx eax, word [rax + 0xe]
cmp dword [rsp + 0x30], eax
jle 0x18005bb80
mov eax, dword [rsp + 0x58]
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x30]
mov dword [rsp + 0x48], eax
mov eax, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x38]
lea eax, [rax + rcx + 4]
mov rcx, qword [rsp + 0xe8]
mov dword [rcx], eax
mov eax, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x38]
add ecx, eax
mov eax, ecx
cdqe
mov rcx, qword [rsp + 0xd8]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x98], rax
mov qword [rsp + 0x90], 0
mov dword [rsp + 0x3c], 0
mov rax, qword [rsp + 0xd0]
mov rax, qword [rax + 0x48]
mov qword [rsp + 0x60], rax
xor eax, eax
cmp eax, 1
je 0x18005be65
mov eax, dword [rsp + 0x34]
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x48]
cmp dword [rsp + 0x30], eax
jle 0x18005bc0c
mov eax, dword [rsp + 0x48]
mov dword [rsp + 0x30], eax
mov eax, dword [rsp + 0x30]
cmp dword [rsp + 0x40], eax
jl 0x18005bc2c
movsxd rax, dword [rsp + 0x30]
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x68]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
jmp 0x18005bc6f
cmp dword [rsp + 0x40], 0
jle 0x18005bc51
mov eax, dword [rsp + 0x40]
mov dword [rsp + 0x30], eax
movsxd rax, dword [rsp + 0x30]
mov rdi, qword [rsp + 0x50]
mov rsi, qword [rsp + 0x68]
mov rcx, rax
rep movsb byte [rdi], byte [rsi]
jmp 0x18005bc6f
movsxd rax, dword [rsp + 0x30]
mov qword [rsp + 0xa8], rax
mov rdi, qword [rsp + 0x50]
xor eax, eax
mov rcx, qword [rsp + 0xa8]
rep stosb byte [rdi], al
mov eax, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x34]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x34], eax
cmp dword [rsp + 0x34], 0
jg 0x18005bc8b
jmp 0x18005be65
movsxd rax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x50]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x50], rax
movsxd rax, dword [rsp + 0x30]
mov rcx, qword [rsp + 0x68]
add rcx, rax
mov rax, rcx
mov qword [rsp + 0x68], rax
mov eax, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x40]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x40], eax
mov eax, dword [rsp + 0x30]
mov ecx, dword [rsp + 0x48]
sub ecx, eax
mov eax, ecx
mov dword [rsp + 0x48], eax
cmp dword [rsp + 0x48], 0
jne 0x18005be60
mov qword [rsp + 0x78], 0
mov eax, dword [rsp + 0x3c]
mov dword [rsp + 0x80], eax
mov rax, qword [rsp + 0x60]
movzx eax, byte [rax + 0x21]
test eax, eax
je 0x18005bd37
mov eax, dword [rsp + 0x3c]
inc eax
mov dword [rsp + 0x3c], eax
mov edx, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x60]
call fcn.1800525c0
cmp eax, dword [rsp + 0x3c]
je 0x18005bd01
xor edx, edx
mov eax, dword [0x18012a594]
mov rcx, qword [rsp + 0x60]
div dword [rcx + 0x30]
inc eax
cmp dword [rsp + 0x3c], eax
je 0x18005bd01
mov byte [rsp + 0x20], 0
mov r9d, dword [rsp + 0x3c]
lea r8, [rsp + 0x3c]
lea rdx, [rsp + 0x78]
mov rcx, qword [rsp + 0x60]
call fcn.18005a780
mov dword [rsp + 0x4c], eax
mov rax, qword [rsp + 0x60]
movzx eax, byte [rax + 0x21]
test eax, eax
je 0x18005bdd2
cmp dword [rsp + 0x4c], 0
jne 0x18005bdd2
cmp dword [rsp + 0x80], 0
je 0x18005bd84
mov dword [rsp + 0x84], 4
jmp 0x18005bd8f
mov dword [rsp + 0x84], 3
movzx eax, byte [rsp + 0x84]
mov byte [rsp + 0x44], al
lea rax, [rsp + 0x4c]
mov qword [rsp + 0x20], rax
mov r9d, dword [rsp + 0x80]
movzx r8d, byte [rsp + 0x44]
mov edx, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x60]
call fcn.180052640
cmp dword [rsp + 0x4c], 0
je 0x18005bdd2
mov rcx, qword [rsp + 0x78]
call fcn.1800550f0
cmp dword [rsp + 0x4c], 0
je 0x18005bdef
mov rcx, qword [rsp + 0x90]
call fcn.1800550f0
mov eax, dword [rsp + 0x4c]
jmp 0x18005be74
mov edx, dword [rsp + 0x3c]
mov rcx, qword [rsp + 0x98]
call fcn.18003aca0
mov rcx, qword [rsp + 0x90]
call fcn.1800550f0
mov rax, qword [rsp + 0x78]
mov qword [rsp + 0x90], rax
mov rax, qword [rsp + 0x78]
mov rax, qword [rax + 0x50]
mov qword [rsp + 0x98], rax
xor edx, edx
mov rcx, qword [rsp + 0x98]
call fcn.18003aca0
mov eax, 1
imul rax, rax, 4
mov rcx, qword [rsp + 0x78]
add rax, qword [rcx + 0x50]
mov qword [rsp + 0x50], rax
mov rax, qword [rsp + 0x60]
mov eax, dword [rax + 0x34]
sub eax, 4
mov dword [rsp + 0x48], eax
jmp 0x18005bbe7
mov rcx, qword [rsp + 0x90]
call fcn.1800550f0
xor eax, eax
add rsp, 0xb8
pop rdi
pop rsi
ret