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

Disassembly:
mov ecx, dword [esp + 8]
test ecx, ecx
jne 0x1000f99e
mov eax, 0x107
ret
test ecx, 0xffff0000
je 0x1000f9af
mov dword [esp + 8], ecx
jmp 0x1000fba0
xor edx, edx
mov eax, 0x10000
div ecx
mov eax, dword [esp + 4]
push ebx
push ebp
push esi
mov esi, dword [eax + 4]
mov ebx, edx
mov eax, dword [eax + 8]
xor edx, edx
mov ebp, dword [esp + 0x18]
push edi
mov esi, dword [eax + esi*4 - 4]
mov eax, esi
shr eax, 0x10
div ecx
movzx eax, si
imul edx, ebx
add eax, edx
xor edx, edx
div ecx
mov eax, dword [esp + 0x14]
mov dword [ebp], edx
mov edi, dword [eax + 4]
sub edi, 2
js 0x1000fa21
mov eax, dword [eax + 8]
mov esi, dword [eax + edi*4]
mov edx, esi
mov eax, dword [ebp]
imul eax, ebx
shr edx, 0x10
add eax, edx
xor edx, edx
div ecx
movzx eax, si
imul edx, ebx
add eax, edx
xor edx, edx
div ecx
dec edi
mov eax, dword [esp + 0x14]
mov dword [ebp], edx
jns 0x1000f9f4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret
sub esp, 0x40
lea eax, [esp + 0x10]
push ebx
mov ebx, dword [esp + 0x48]
push ebp
push esi
push edi
push eax
push dword [ebx + 0xc]
call fcn.1000d1d0
lea eax, [esp + 0x38]
push eax
push dword [ebx + 0xc]
call fcn.1000d1d0
lea eax, [esp + 0x50]
push eax
push dword [ebx + 0xc]
call fcn.1000d1d0
lea eax, [esp + 0x28]
push eax
push dword [ebx + 0xc]
call fcn.1000d1d0
mov ebp, dword [esp + 0x78]
add esp, 0x20
mov edi, ebp
neg edi
cmp edi, ebp
jb 0x1000fbf6
mov eax, edi
xor edx, edx
div ebp
mov edi, edx
lea eax, [esp + 0x20]
push eax
push 1
call fcn.1000d300
mov esi, eax
add esp, 8
test esi, esi
jne 0x1000fd02
mov eax, dword [esp + 0x28]
mov dword [eax], ebp
lea eax, [esp + 0x30]
push eax
push 1
mov dword [esp + 0x2c], 1
call fcn.1000d300
mov esi, eax
add esp, 8
test esi, esi
jne 0x1000fd02
mov eax, dword [esp + 0x38]
mov dword [eax], edi
lea eax, [esp + 0x10]
push eax
push 2
mov dword [esp + 0x3c], 1
call fcn.1000d300
mov esi, eax
add esp, 8
test esi, esi
jne 0x1000fd02
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
mov ecx, dword [eax + ecx*4 - 4]
mov eax, dword [esp + 0x18]
mov dword [eax], ecx
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x24]
mov dword [esp + 0x18], 1
push eax
lea eax, [esp + 0x18]
push eax
call fcn.1000f630
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1000fd02
mov edi, dword [ebx + 4]
sub edi, 2
js 0x1000fcf6
lea ebx, [ebx]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x44]
push eax
lea eax, [esp + 0x38]
push eax
call fcn.1000fd40
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1000fd02
lea eax, [esp + 0x10]
push eax
mov eax, dword [ebx + 8]
push dword [eax + edi*4]
call fcn.1000d8e0
mov esi, eax
add esp, 8
test esi, esi
jne 0x1000fd02
lea eax, [esp + 0x40]
push eax
lea eax, [esp + 0x24]
push eax
lea eax, [esp + 0x18]
push eax
call fcn.1000f630
mov esi, eax
add esp, 0xc
test esi, esi
jne 0x1000fd02
dec edi
jns 0x1000fca0
mov eax, dword [esp + 0x48]
mov ecx, dword [eax]
mov eax, dword [esp + 0x5c]
mov dword [eax], ecx
lea eax, [esp + 0x20]
push eax
call fcn.1000d1f0
lea eax, [esp + 0x34]
push eax
call fcn.10050400
lea eax, [esp + 0x48]
push eax
call fcn.1000d1f0
lea eax, [esp + 0x1c]
push eax
call fcn.1000d1f0
add esp, 0x10
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x40
ret