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

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
mov esi, dword [ebp + 8]
mov eax, dword [esi]
xor ecx, ecx
xor edx, edx
inc ecx
cmp eax, ecx
push edi
mov dword [ebp - 0x20], edx
je 0x1012972
cmp eax, 6
je 0x1012972
cmp eax, 2
jne 0x101296d
cmp dword [0x103d580], edx
je 0x1012972
mov dword [ebp - 8], edx
jmp 0x1012975
mov dword [ebp - 8], ecx
cmp dword [ebp + 0x10], edx
je 0x1012982
cmp dword [ebp - 8], edx
mov dword [ebp - 4], edx
jne 0x1012989
mov dword [ebp - 4], 2
mov ebx, dword [esi + 0xba]
mov eax, dword [ebp + 0xc]
mov ecx, dword [esi + 0x14]
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], ebx
imul ebx, ebx, 0x3e
mov dword [ebp - 0xc], edx
mov dword [ebp - 0x18], edx
mov edx, dword [esi + 0x1c]
mov eax, edx
sub eax, ecx
mov ecx, dword [esi + 0xaa]
mov dword [ebp - 0x1c], eax
mov eax, dword [ecx + ebx + 0x1c]
add eax, dword [ebp + 0xc]
mov dword [ebp + 8], eax
mov eax, dword [esi + 0xbe]
mov dword [ebp - 0x28], eax
imul eax, eax, 0x3e
mov dword [ebp - 0x24], eax
add eax, ecx
mov edi, dword [eax + 0x24]
add edi, dword [eax + 0x1c]
sub edi, edx
add edi, dword [esi + 0x14]
add edi, dword [ebp + 0xc]
and byte [esi + 0x98], 0xfc
xor eax, eax
cmp dword [ebp + 8], eax
jle 0x1012a7d
cmp dword [ebp - 0x20], eax
jne 0x1012a1d
push eax
push esi
call fcn.01027988
push eax
push 1
push esi
call fcn.01027988
push eax
lea eax, [ebp + 0x10]
push eax
mov eax, dword [esi + 0xaa]
push esi
push 0
push dword [eax + ebx + 0x10]
call fcn.0100dbe5
jmp 0x1012a24
mov dword [ebp + 0x10], 0xa4
test eax, eax
jne 0x1012a56
cmp dword [ebp + 0x10], 0xa4
je 0x1012a3b
push 2
push dword [ebp + 0x10]
call fcn.01026a0b
mov ecx, dword [ebp + 8]
sub dword [ebp - 0x14], ecx
xor eax, eax
inc eax
or word [esi + 0x98], ax
sub edi, ecx
and dword [ebp + 8], 0
mov dword [ebp - 0xc], eax
jmp 0x10129e4
push 0
push 1
push 0
push eax
push esi
call fcn.01011da8
mov ebx, eax
imul ebx, ebx, 0x3e
mov dword [ebp - 0x10], eax
mov eax, dword [esi + 0xaa]
mov eax, dword [eax + ebx + 0x24]
sub dword [ebp + 8], eax
jmp 0x10129e4
cmp edi, eax
jl 0x1012a8b
cmp dword [ebp - 4], 1
jne 0x1012b6e
cmp dword [ebp - 4], 1
jne 0x1012ad1
cmp dword [ebp - 0xc], eax
mov dword [ebp + 0x10], 0xa4
jne 0x1012aa3
mov edi, dword [ebp - 0x2c]
add dword [ebp + 8], edi
mov dword [ebp - 4], 2
xor eax, eax
cmp dword [ebp - 0xc], eax
jne 0x1012b2e
cmp dword [ebp - 0x18], eax
jne 0x1012b2e
cmp dword [ebp - 8], eax
je 0x1012b2e
mov eax, dword [ebp - 0x1c]
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x18], 1
add edi, eax
jmp 0x10129e4
push eax
push esi
call fcn.01027988
push eax
push 1
push esi
call fcn.01027988
mov ecx, dword [ebp - 0x24]
push eax
lea eax, [ebp + 0x10]
push eax
mov eax, dword [esi + 0xaa]
push esi
push 1
push dword [eax + ecx + 0x10]
call fcn.0100dbe5
xor ecx, ecx
cmp eax, ecx
jne 0x1012b4c
cmp dword [ebp + 0x10], 0xa4
je 0x1012b14
push 2
push dword [ebp + 0x10]
call fcn.01026a0b
cmp dword [ebp - 4], 0
jne 0x1012aaa
sub dword [ebp + 8], edi
mov dword [ebp - 0x2c], edi
xor edi, edi
mov dword [ebp - 4], 1
jmp 0x10129e4
or byte [esi + 0x98], 2
cmp dword [ebp - 0xc], eax
jne 0x1012b6e
cmp dword [ebp - 8], eax
je 0x1012b6e
sub dword [ebp + 8], edi
sub dword [ebp - 0x14], edi
xor edi, edi
jmp 0x10129e4
push ecx
push ecx
push ecx
push eax
push esi
call fcn.01011da8
mov ecx, dword [esi + 0xaa]
mov dword [ebp - 0x28], eax
imul eax, eax, 0x3e
add edi, dword [ecx + eax + 0x24]
mov dword [ebp - 0x24], eax
jmp 0x10129e4
cmp dword [esi], 3
jne 0x1012b7e
mov ecx, dword [ebp - 0x1c]
add ecx, edi
js 0x1012d47
cmp dword [ebp - 0x18], eax
je 0x1012b8e
mov eax, dword [ebp - 0x1c]
push 0xfffffffffffffffe
cdq
pop ecx
idiv ecx
add edi, eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 0xaa]
imul eax, eax, 0x3e
mov ecx, dword [ecx + eax + 0x24]
add ecx, dword [ebp + 8]
jns 0x1012bda
mov ecx, dword [esi + 0xba]
mov edx, dword [esi + 0xaa]
mov eax, dword [edx + eax + 0x24]
add dword [ebp + 8], eax
push ecx
push esi
call fcn.01011ec4
mov ecx, dword [esi + 0xba]
mov edx, dword [esi + 0xaa]
mov eax, ecx
mov dword [ebp - 0x10], eax
imul eax, eax, 0x3e
mov edx, dword [edx + eax + 0x24]
add edx, dword [ebp + 8]
js 0x1012ba9
mov eax, dword [ebp - 0x28]
mov ecx, dword [esi + 0xaa]
imul eax, eax, 0x3e
mov edx, edi
sub edx, dword [ecx + eax + 0x24]
test edx, edx
jle 0x1012c2a
mov ecx, dword [esi + 0xbe]
cmp dword [esi + 0xba], ecx
je 0x1012c2a
mov edx, dword [esi + 0xaa]
sub edi, dword [edx + eax + 0x24]
push ecx
push esi
call fcn.01011ec4
mov ecx, dword [esi + 0xbe]
mov edx, dword [esi + 0xaa]
mov eax, ecx
imul eax, eax, 0x3e
mov ebx, edi
sub ebx, dword [edx + eax + 0x24]
test ebx, ebx
jg 0x1012bf6
mov ebx, dword [esi + 0x18]
sub ebx, dword [esi + 0x10]
mov ecx, dword [esi + 0xba]
and dword [esi + 0x9e], 0
cmp ecx, 0xffffffff
mov edx, dword [ebp + 8]
mov dword [ebp - 0x24], ebx
mov dword [ebp + 0xc], ecx
je 0x1012cc7
jmp 0x1012c50
mov edx, dword [ebp - 0x28]
mov eax, dword [esi + 0xaa]
imul ecx, ecx, 0x3e
lea eax, [eax + ecx + 8]
mov dword [eax + 0x14], edx
add edx, dword [eax + 0x1c]
mov dword [ebp - 0x28], edx
mov edx, dword [eax + 0x18]
sub edx, ebx
mov ebx, dword [eax + 0x10]
add edx, ebx
mov ebx, dword [esi + 0x9e]
cmp ebx, edx
jle 0x1012c7c
mov edx, ebx
mov ebx, dword [ebp - 0x24]
mov dword [esi + 0x9e], edx
mov edx, dword [eax + 0x18]
mov eax, dword [eax + 0x10]
add eax, edx
mov edx, eax
sub edx, ebx
test edx, edx
jle 0x1012ca7
mov edx, dword [esi + 0xa2]
cmp edx, eax
jle 0x1012ca1
mov eax, edx
mov dword [esi + 0xa2], eax
cmp dword [ebp + 0xc], 0xffffffff
jne 0x1012cb5
mov ecx, dword [esi + 0xba]
jmp 0x1012cbf
mov eax, dword [esi + 0xaa]
mov ecx, dword [eax + ecx + 4]
cmp ecx, 0xffffffff
mov dword [ebp + 0xc], ecx
jne 0x1012c4d
xor edx, edx
cmp dword [ebp - 0x20], edx
jne 0x1012d4b
cmp dword [ebp - 8], edx
je 0x1012d4b
cmp dword [ebp - 0xc], edx
je 0x1012d4b
cmp edi, edx
jge 0x1012d4b
neg edi
cmp edi, dword [esi + 0x7c]
jg 0x1012cf4
mov eax, dword [esi + 0x78]
sub eax, dword [esi + 0x10]
add eax, dword [esi + 0x18]
cmp dword [esi + 0xa2], eax
jg 0x1012d4b
mov edi, dword [ebp - 0x10]
mov eax, dword [esi + 0xaa]
imul edi, edi, 0x3e
mov eax, dword [eax + edi + 0x10]
xor ebx, ebx
inc ebx
xor ecx, ecx
mov dx, bx
mov dword [ebp + 0xc], eax
call fcn.01012747
mov eax, dword [esi + 0xaa]
or dword [esi + 0x13a], 0xffffffff
and dword [eax + edi + 0x10], 0
push esi
call fcn.0101255e
xor edi, edi
push edi
push ebx
push edi
push dword [ebp + 0xc]
push esi
call fcn.01011da8
mov dword [ebp + 0xc], edi
mov dword [ebp - 0x20], ebx
xor edx, edx
jmp 0x1012989
xor eax, eax
jmp 0x1012da5
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi + 0xaa]
imul eax, eax, 0x3e
add ecx, eax
mov eax, dword [ecx + 0x14]
mov dword [esi + 0x90], eax
mov edi, dword [ecx + 0x24]
cmp edi, edx
jne 0x1012d71
mov dword [esi + 0x94], edx
jmp 0x1012d84
mov eax, dword [ebp + 8]
neg eax
shl eax, 0x10
cdq
idiv edi
xor edx, edx
mov dword [esi + 0x94], eax
cmp dword [esi], 5
jne 0x1012d8e
mov eax, dword [esi + 0x3c]
jmp 0x1012d91
mov eax, dword [esi + 0x40]
cmp eax, dword [ecx + 0x14]
jne 0x1012da2
cmp dword [ecx + 0x1c], edx
jne 0x1012da2
or byte [esi + 0x98], 1
mov eax, dword [ebp - 0x14]
pop edi
pop esi
pop ebx
leave
ret 0xc