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

Disassembly:
sub esp, 0x8c
mov edx, dword [esp + 0xa8]
xor eax, eax
push ebx
push ebp
push esi
mov ebp, dword [esp + 0x9c]
mov ecx, edx
push edi
push 9
pop esi
sub esi, dword [esp + 0xe0]
cmp dword [esp + 0xe0], 9
mov ebx, dword [ebp + 0xb8]
cmova esi, eax
inc eax
sub ecx, esi
shl eax, cl
cmp esi, 9
sbb ecx, ecx
xor edi, edi
and ecx, eax
inc edi
mov eax, dword [esp + 0xb0]
mov dword [esp + 0x3c], ecx
lea ecx, [edx + 2]
shl edi, cl
xor edx, edx
mov ecx, edi
shl ecx, 2
imul ecx, ebx
div ecx
xor edx, edx
lea esi, [eax + 1]
mov eax, dword [esp + 0xb0]
div edi
mov edi, dword [esp + 0xb0]
mov ecx, esi
imul ecx, ebx
inc eax
cmp eax, ebx
push edi
cmovb ebx, eax
cmp esi, 1
lea eax, [edi - 1]
cmova ebx, ecx
xor edx, edx
add eax, ebx
mov dword [esp + 0x38], ebx
div ebx
mov esi, eax
mov edx, esi
and edx, 0x1ffff
cmp edx, 0x7fff
lea ecx, [esi + 0xffff]
cmovb esi, ecx
mov dword [esp + 0x3c], esi
call fcn.1008b38c
pop ecx
cmp dword [esp + 0xa8], eax
jb 0x1007bf78
mov dword [esp + 0x28], ebx
jmp 0x1007bf90
push esi
call fcn.1008b38c
pop ecx
mov ecx, eax
xor edx, edx
mov eax, dword [esp + 0xa8]
div ecx
mov dword [esp + 0x28], eax
xor edx, edx
mov dword [esp + 0x1c], edx
mov dword [esp + 0x24], edx
cmp ebx, 1
jne 0x1007c02f
mov eax, dword [ebp + 0xc]
mov eax, dword [eax + 0x18]
cmp dword [esp + 0xb4], edx
je 0x1007bff2
sub esp, 0xc
lea esi, [esp + 0xe0]
mov edi, esp
push dword [esp + 0xc0]
movsd dword es:[edi], dword [esi]
push dword [esp + 0xc0]
push dword [esp + 0xc0]
movsd dword es:[edi], dword [esi]
push dword [esp + 0xc0]
push dword [esp + 0xc0]
movsd dword es:[edi], dword [esi]
push eax
call fcn.100797d8
add esp, 0x24
jmp 0x1007c38c
sub esp, 0x28
lea esi, [esp + 0xe0]
push 0xa
pop ecx
mov edi, esp
push edx
push edx
push dword [esp + 0xe0]
rep movsd dword es:[edi], dword [esi]
push dword [esp + 0xe0]
push dword [esp + 0xe0]
push dword [esp + 0xe0]
push eax
call fcn.10090540
add esp, 0x44
jmp 0x1007c38c
push esi
call fcn.1008b38c
mov ecx, dword [ebp + 8]
push 0
push 0
mov dword [ecx + 4], eax
lea eax, [esp + 0x50]
push eax
call fcn.100793c4
mov eax, dword [ebp + 0xbc]
add esp, 0x10
inc eax
cmp ebx, eax
jbe 0x1007c0b6
mov dword [esp + 0x14], ebx
sub esp, 0xc
lea ebx, [ebp + 0xe4]
mov edi, esp
mov esi, ebx
push dword [ebp + 4]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.1008336c
and dword [ebp + 0xbc], 0
lea eax, [esp + 0x24]
add esp, 4
mov esi, ebx
mov edi, esp
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.100904d8
add esp, 0x10
mov dword [ebp + 4], eax
test eax, eax
jne 0x1007c0a0
push 0xffffffffffffffc0
pop eax
jmp 0x1007c38c
mov eax, dword [esp + 0x14]
mov ebx, dword [esp + 0x34]
dec eax
mov edi, dword [esp + 0xb0]
mov dword [ebp + 0xbc], eax
and dword [esp + 0x10], 0
xor esi, esi
test ebx, ebx
je 0x1007c33c
mov dword [esp + 0x40], edi
mov dword [esp + 0x14], esi
mov eax, dword [esp + 0x38]
cmp edi, eax
cmovb eax, edi
push eax
mov dword [esp + 0x24], eax
call fcn.1008b38c
mov edi, dword [0x100771c8]
mov edx, eax
mov eax, dword [esp + 0xa8]
add eax, dword [esp + 0x28]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x14]
pop ecx
mov ecx, dword [0x100771cc]
mov dword [esp + 0x2c], edx
cmp eax, dword [esp + 0x28]
jae 0x1007c112
mov dword [esp + 0x18], edx
jmp 0x1007c11a
mov dword [esp + 0x30], edi
mov dword [esp + 0x18], ecx
xor edx, edx
test eax, eax
mov eax, dword [ebp + 4]
cmovne edx, dword [esp + 0x3c]
push 0xa
mov dword [esi + eax], edi
mov dword [esi + eax + 4], ecx
mov eax, dword [ebp + 4]
mov ecx, dword [esp + 0x20]
sub ecx, edx
add ecx, dword [esp + 0xb0]
mov dword [esi + eax + 8], ecx
mov eax, dword [ebp + 4]
mov ecx, dword [esp + 0x24]
mov dword [esi + eax + 0xc], edx
mov eax, dword [ebp + 4]
mov edx, dword [esp + 0x14]
mov dword [esi + eax + 0x10], ecx
xor ecx, ecx
cmp dword [ebp + 0xc4], ecx
mov eax, dword [ebp + 4]
cmove ecx, dword [esp + 0xb8]
mov dword [esi + eax + 0x64], ecx
mov eax, dword [ebp + 4]
mov ecx, dword [esp + 0x44]
mov dword [esi + eax + 0x70], ecx
and dword [esi + eax + 0x74], 0
mov edi, dword [ebp + 4]
add edi, 0x3c
add edi, esi
lea esi, [esp + 0xbc]
pop ecx
rep movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x14]
test edx, edx
je 0x1007c1a2
mov eax, dword [ebp + 4]
and dword [esi + eax + 0x5c], 0
mov eax, dword [ebp + 4]
mov ecx, dword [esp + 0x30]
mov dword [esi + eax + 0x14], ecx
mov ecx, dword [esp + 0x18]
mov dword [esi + eax + 0x18], ecx
mov ecx, dword [ebp + 4]
mov eax, dword [ebp + 0xc]
mov dword [esi + ecx + 0x68], eax
mov ecx, dword [ebp + 4]
mov eax, dword [ebp + 8]
mov dword [esi + ecx + 0x6c], eax
xor ecx, ecx
mov eax, dword [ebp + 4]
test edx, edx
sete cl
mov dword [esi + eax + 0x24], ecx
xor ecx, ecx
lea eax, [ebx - 1]
cmp edx, eax
mov eax, dword [ebp + 4]
sete cl
mov dword [esi + eax + 0x28], ecx
lea ecx, [ebp + 0x10]
mov eax, dword [ebp + 4]
and dword [esi + eax + 0x2c], 0
cmp dword [esp + 0xd8], 0
mov eax, dword [ebp + 4]
mov dword [esi + eax + 0x34], ecx
lea ecx, [ebp + 0x14]
mov eax, dword [ebp + 4]
mov dword [esi + eax + 0x38], ecx
je 0x1007c22b
push dword [esp + 0x20]
mov eax, dword [esp + 0x20]
add eax, dword [esp + 0xb0]
push eax
lea eax, [esp + 0x4c]
push eax
call fcn.1007c5f8
add esp, 0xc
mov eax, dword [ebp + 4]
add eax, esi
push eax
push 0x1007b9e4
push dword [ebp]
call fcn.1008da64
mov eax, dword [esp + 0x2c]
add esp, 0xc
mov edi, dword [esp + 0xb0]
add esi, 0x78
add dword [esp + 0x1c], eax
sub edi, eax
mov eax, dword [esp + 0x10]
mov ecx, dword [esp + 0x2c]
add dword [esp + 0x24], ecx
inc eax
mov dword [esp + 0xb0], edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x14], esi
cmp eax, ebx
jb 0x1007c0cd
xor ebx, ebx
xor esi, esi
xor edi, edi
and dword [esp + 0x10], ebx
mov eax, dword [ebp + 4]
cmp dword [ebx + eax + 0x2c], 0
je 0x1007c283
and dword [ebx + eax + 8], 0
mov eax, dword [ebp + 4]
mov eax, dword [ebx + eax + 0x1c]
push eax
mov dword [esp + 0x1c], eax
call fcn.1008cf74
test eax, eax
pop ecx
mov ecx, dword [esp + 0x18]
cmovne esi, ecx
test esi, esi
jne 0x1007c2c1
lea eax, [ecx + edi]
cmp eax, dword [esp + 0xa8]
push 0xffffffffffffffba
pop eax
cmova esi, eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1007c326
test esi, esi
jne 0x1007c2eb
mov eax, dword [ebp + 4]
push ecx
push dword [ebx + eax + 0x14]
mov eax, dword [esp + 0xac]
add eax, edi
push eax
call fcn.10084658
mov eax, dword [esp + 0x1c]
add esp, 0xc
cmp eax, dword [esp + 0x28]
jb 0x1007c307
mov eax, dword [ebp + 4]
push dword [ebx + eax + 0x18]
push dword [ebx + eax + 0x14]
push dword [ebp + 8]
call fcn.100559dc
add esp, 0xc
mov eax, dword [ebp + 4]
mov ecx, dword [0x100771c8]
mov edx, dword [0x100771cc]
mov dword [ebx + eax + 0x14], ecx
mov ecx, dword [esp + 0x18]
mov dword [ebx + eax + 0x18], edx
mov eax, dword [esp + 0x10]
add edi, ecx
add ebx, 0x78
inc eax
mov dword [esp + 0x10], eax
cmp eax, dword [esp + 0x34]
jb 0x1007c283
jmp 0x1007c33e
xor edi, edi
cmp dword [esp + 0xd8], 0
je 0x1007c385
lea eax, [esp + 0x44]
push eax
call fcn.100931bc
lea ebx, [edi + 4]
pop ecx
cmp ebx, dword [esp + 0xa8]
jbe 0x1007c366
push 0xffffffffffffffba
pop eax
mov esi, eax
jmp 0x1007c385
mov dword [esp + 0x2c], eax
lea eax, [esp + 0x2c]
push 4
push eax
mov eax, dword [esp + 0xac]
add eax, edi
push eax
call fcn.1007f014
add esp, 0xc
mov edi, ebx
test esi, esi
cmovne edi, esi
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x8c
ret