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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x8c
push ebx
push esi
push edi
mov edi, ecx
mov dword [esp + 0x58], edi
test edi, edi
je 0x1011a2a2
mov eax, edx
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [ebp + 8]
cdq
sar ecx, 1
sub eax, edx
sar eax, 1
mov dword [esp + 0x40], ecx
mov dword [esp + 0x84], ecx
mov dword [esp + 0x44], eax
mov dword [ebp + 8], eax
test ecx, ecx
jne 0x1011a288
test eax, eax
je 0x1011a68a
mov ecx, edi
call fcn.1011a6a0
mov dword [esp + 0x78], eax
cmp eax, 2
jne 0x1011a2ae
cmp word [edi], 0
je 0x1011a68a
mov eax, 6
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov edx, dword [edi + 4]
xor ebx, ebx
xor ecx, ecx
mov dword [esp + 0x3c], edx
xor eax, eax
mov dword [esp + 0x38], ebx
mov dword [esp + 0x5c], ecx
cmp ax, word [edi]
jge 0x1011a68a
nop dword [eax]
mov eax, dword [edi + 0xc]
movsx eax, word [eax + ecx*2]
mov ecx, dword [edx + ebx*8]
mov dword [esp + 0x68], ecx
mov ecx, dword [edx + ebx*8 + 4]
mov dword [esp + 0x6c], ecx
mov ecx, dword [edx + ebx*8]
mov esi, ecx
mov edx, dword [edx + ebx*8 + 4]
mov edi, edx
mov dword [esp + 0x30], ecx
mov ecx, dword [esp + 0x3c]
mov dword [esp + 0x64], eax
mov dword [esp + 0x34], edx
sub esi, dword [ecx + eax*8]
sub edi, dword [ecx + eax*8 + 4]
lea ecx, [esp + 0x1c]
mov dword [esp + 0x10], esi
mov dword [esp + 0x1c], esi
mov dword [esp + 0xc], edi
mov dword [esp + 0x20], edi
call fcn.1011b020
mov dword [esp + 0x18], eax
test eax, eax
je 0x1011a34d
mov edx, eax
mov ecx, esi
call fcn.10116fd0
mov edx, dword [esp + 0x18]
mov ecx, edi
mov dword [esp + 0x10], eax
mov dword [esp + 0x1c], eax
call fcn.10116fd0
mov dword [esp + 0xc], eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x64]
cmp ebx, eax
jg 0x1011a667
jge 0x1011a369
mov ecx, dword [esp + 0x3c]
mov eax, dword [ecx + ebx*8 + 8]
mov ecx, dword [ecx + ebx*8 + 0xc]
jmp 0x1011a371
mov eax, dword [esp + 0x68]
mov ecx, dword [esp + 0x6c]
mov edi, ecx
mov dword [esp + 0x60], ecx
sub edi, dword [esp + 0x34]
lea ecx, [esp + 0x28]
mov ebx, eax
mov dword [esp + 0x54], eax
sub ebx, dword [esp + 0x30]
mov dword [esp + 0x48], ebx
mov dword [esp + 0x28], ebx
mov dword [esp + 0x4c], edi
mov dword [esp + 0x2c], edi
call fcn.1011b020
mov esi, eax
mov dword [esp + 0x24], edi
mov dword [esp + 0x50], esi
mov dword [esp + 0x14], ebx
test esi, esi
je 0x1011a3d8
mov edx, esi
mov ecx, ebx
call fcn.10116fd0
mov ebx, eax
mov edx, esi
mov ecx, edi
mov dword [esp + 0x48], ebx
mov dword [esp + 0x28], ebx
call fcn.10116fd0
mov dword [esp + 0x4c], eax
mov edi, eax
mov dword [esp + 0x2c], eax
jmp 0x1011a3e0
mov edi, dword [esp + 0x24]
mov ebx, dword [esp + 0x14]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x28]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x70], eax
mov esi, dword [esp + 0x70]
mov eax, dword [esp + 0x20]
mov edx, dword [esp + 0x2c]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0x74]
add eax, esi
cmp eax, 0xffff1000
jle 0x1011a5f7
mov ecx, dword [esp + 0x10]
add eax, 0x10000
mov esi, dword [esp + 0x78]
add ecx, ebx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0xc]
add eax, edi
mov dword [esp + 0x24], ecx
mov dword [esp + 0xc], eax
test esi, esi
jne 0x1011a46e
neg eax
mov dword [esp + 0xc], eax
jmp 0x1011a474
neg ecx
mov dword [esp + 0x24], ecx
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x20]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x7c], eax
mov ebx, dword [esp + 0x7c]
mov eax, dword [esp + 0x2c]
mov edx, dword [esp + 0x1c]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x80], eax
sub ebx, dword [esp + 0x80]
mov dword [esp + 0x10], ebx
test esi, esi
jne 0x1011a4dc
neg ebx
mov dword [esp + 0x10], ebx
mov eax, dword [esp + 0x50]
mov esi, eax
cmp dword [esp + 0x18], eax
cmovl esi, dword [esp + 0x18]
mov dword [esp + 0x18], esi
mov eax, dword [esp + 0x84]
mov edx, dword [esp + 0x10]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x88], eax
mov edi, dword [esp + 0x88]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x8c], eax
cmp edi, dword [esp + 0x8c]
jg 0x1011a55e
mov edx, dword [esp + 0x40]
mov eax, dword [esp + 0x14]
jmp 0x1011a562
mov edx, esi
mov eax, ebx
mov ecx, dword [esp + 0xc]
push eax
call fcn.10116ea0
add esp, 4
mov dword [esp + 0xc], eax
mov eax, dword [ebp + 8]
mov edx, dword [esp + 0x10]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x90], eax
mov edi, dword [esp + 0x90]
mov eax, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
imul edx
mov ecx, edx
sar ecx, 0x1f
add ecx, 0x8000
add eax, ecx
adc edx, 0
shr eax, 0x10
shl edx, 0x10
add eax, edx
mov dword [esp + 0x94], eax
cmp edi, dword [esp + 0x94]
jg 0x1011a5de
mov esi, dword [esp + 0x44]
mov eax, dword [esp + 0x14]
jmp 0x1011a5e0
mov eax, ebx
mov ecx, dword [esp + 0x24]
mov edx, esi
push eax
call fcn.10116ea0
mov edx, eax
add esp, 4
mov eax, dword [esp + 0xc]
jmp 0x1011a5fb
xor eax, eax
xor edx, edx
mov edi, dword [esp + 0x58]
mov ecx, dword [esp + 0x30]
mov ebx, dword [esp + 0x38]
add ecx, eax
add ecx, dword [esp + 0x40]
mov eax, dword [edi + 4]
mov esi, dword [esp + 0x48]
mov dword [esp + 0x10], esi
mov dword [esp + 0x1c], esi
mov dword [eax + ebx*8], ecx
mov ecx, dword [esp + 0x34]
mov eax, dword [edi + 4]
add ecx, edx
add ecx, dword [esp + 0x44]
mov dword [eax + ebx*8 + 4], ecx
inc ebx
mov eax, dword [esp + 0x4c]
mov dword [esp + 0xc], eax
mov dword [esp + 0x20], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x54]
mov dword [esp + 0x30], eax
mov eax, dword [esp + 0x60]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x64]
mov dword [esp + 0x38], ebx
cmp ebx, eax
jle 0x1011a359
jmp 0x1011a66b
mov edi, dword [esp + 0x58]
mov ecx, dword [esp + 0x5c]
lea ebx, [eax + 1]
movsx eax, word [edi]
inc ecx
mov edx, dword [esp + 0x3c]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x5c], ecx
cmp ecx, eax
jl 0x1011a2d0
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret