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

Disassembly:
sub esp, 0x48
mov edx, dword [0x100491c0]
push ebx
push ebp
mov ecx, dword [0x100491b0]
mov eax, edx
imul eax, edx
push esi
mov esi, dword [0x100491b4]
push edi
push 2
mov dword [esp + 0x1c], eax
mov eax, dword [0x100491c4]
pop edi
sub edi, esi
imul edi, eax
sub edi, dword [0x100491b8]
and dword [esp + 0x14], 0
lea edi, [edi + edi + 0x40]
mov ebx, edi
mov edi, dword [0x100491bc]
lea ebp, [ecx + ecx + 2]
imul ebp, edi
sub ebx, ebp
inc edi
imul edi, eax
mov ebp, esi
sub ebp, edi
sub ebp, dword [esp + 0x18]
add ebp, dword [esp + 0x60]
cmp ebp, ebx
jae 0x100050c5
xor eax, eax
jmp 0x10005d47
mov ebx, dword [0x100491bc]
mov ebp, dword [esp + 0x5c]
movzx ebp, word [ebp]
mov edi, ecx
sub edi, edx
sub edi, esi
sub edi, ebx
lea edi, [edi*4 + 0x5a4d]
cmp ebp, edi
jne 0x100050be
mov ebp, dword [esp + 0x5c]
mov ebp, dword [ebp + 0x3c]
mov dword [esp + 0x1c], ebp
mov ebp, dword [0x100491b8]
imul ebp, edx
mov dword [esp + 0x20], ebp
mov edi, eax
imul edi, ecx
mov dword [esp + 0x28], edi
mov ebp, esi
imul ebp, esi
mov dword [esp + 0x24], ebp
mov ebp, dword [esp + 0x28]
imul ebp, ebx
add ebp, ebp
mov edi, edx
imul edi, ebx
sub ebp, edi
sub ebp, edi
sub ebp, eax
sub ebp, eax
sub ebp, ecx
sub ebp, ecx
inc ebp
inc ebp
imul ebp, eax
mov edi, ecx
sub edi, edx
sub edi, ebx
lea edi, [ebp + edi*2 + 0xf8]
lea ebx, [edx + edx + 4]
imul ebx, esi
sub edi, ebx
add edi, dword [esp + 0x1c]
mov ebx, dword [0x100491bc]
lea ebp, [ecx + ecx - 6]
imul ebp, dword [0x100491b8]
add ebp, edi
mov edi, dword [esp + 0x20]
sub edi, dword [esp + 0x24]
inc edi
inc edi
imul edi, esi
inc ebx
imul ebx, ecx
add edi, ebx
mov ebx, ecx
imul edi, edi, 3
imul ebx, ebx, 3
sub ebx, 3
imul ebx, dword [0x100491b8]
imul ebx, eax
add edi, ebx
mov ebx, dword [0x100491b8]
sub edi, eax
sub edi, eax
sub edi, eax
add edi, ebx
add edi, ebx
add edi, ebx
add edi, dword [esp + 0x60]
cmp edi, ebp
jb 0x100050be
mov edi, esi
sub edi, dword [0x100491bc]
mov ebp, ecx
add edi, edi
sub edi, dword [esp + 0x18]
sub ebp, esi
add edi, eax
imul edi, edi, 3
add edi, dword [esp + 0x1c]
add edi, dword [esp + 0x5c]
inc ebp
imul ebp, ebx
lea ebx, [esi + eax + 4]
imul ebx, eax
sub ebp, ebx
mov ebx, dword [0x100491bc]
lea ebp, [ebp + esi*2 + 0x4550]
sub ebp, ebx
mov dword [esp + 0x10], edi
cmp dword [edi], ebp
jne 0x100050be
mov ebp, edx
imul ebp, ecx
mov edi, ecx
imul edi, ebx
dec ebp
imul ebp, dword [0x100491b8]
mov dword [esp + 0x18], edi
add edi, 2
imul edi, eax
lea ebp, [eax + ebp + 2]
imul ebp, esi
sub ebp, edi
mov edi, 0xa6
sub edi, ebx
lea edi, [ebp + edi*2]
mov ebp, dword [esp + 0x10]
movzx ebp, word [ebp + 4]
sub edi, edx
add edi, ecx
cmp ebp, edi
jne 0x100050be
mov edi, esi
imul edi, ebx
lea ebp, [edx + edx - 6]
imul ebp, dword [0x100491b8]
add edi, edi
sub ebp, edi
mov edi, dword [esp + 0x10]
mov edi, dword [edi + 0x38]
inc ebp
test edi, ebp
jne 0x100050be
lea edi, [ecx + 1]
imul edi, esi
lea edi, [edi + edx + 1]
imul edi, ebx
mov ebx, dword [0x100491b8]
sub ebx, eax
imul ebx, edx
sub ebx, edi
mov edi, dword [esp + 0x10]
movzx ebp, word [edi + 0x14]
sub ebx, esi
sub ebx, eax
imul ebx, ebx, 0xa0
add ebx, edi
lea edi, [ebx + ebp + 0x18]
mov dword [esp + 0x2c], edi
mov edi, dword [0x100491bc]
xor ebx, ebx
imul edi, edi, 5
inc ebx
sub ebx, edx
imul ebx, ecx
mov dword [esp + 0x1c], edi
add edi, 0xa
imul edi, esi
mov ebp, eax
shl ebp, 2
sub ebx, ebp
imul ebx, ebx, 5
sub ebx, edi
mov ebp, dword [esp + 0x10]
movzx ebp, word [ebp + 6]
mov edi, edx
imul edi, edi, 0xa
add edi, 5
imul edi, dword [0x100491b8]
add edi, dword [esp + 0x1c]
add edi, ebx
add edi, ebp
mov dword [esp + 0x1c], edi
je 0x100053b9
xor ebx, ebx
inc ebx
sub ebx, dword [esp + 0x18]
lea edi, [eax + eax]
imul ebx, dword [0x100491b8]
lea ebp, [edi - 2]
imul ebp, edx
lea ebx, [ebp + ebx*2]
sub ebx, edi
mov edi, dword [esp + 0x2c]
mov dword [esp + 0x30], ebx
mov ebx, dword [esp + 0x1c]
add edi, 0xc
mov dword [esp + 0x18], edi
mov dword [esp + 0x1c], ebx
cmp dword [edi + 4], 0
jne 0x10005337
mov ebx, dword [0x100491b8]
mov edi, dword [edi]
add ebx, edx
add ebx, dword [0x100491bc]
mov ebp, eax
add ebx, ebx
sub ebp, ebx
mov ebx, dword [esp + 0x10]
add ebp, ecx
lea edi, [edi + ebp*2]
add edi, dword [ebx + 0x38]
jmp 0x1000536a
mov edi, dword [esp + 0x20]
inc edi
imul edi, dword [0x100491b8]
lea ebx, [edx + 1]
imul ebx, dword [0x100491bc]
sub edi, ebx
mov ebx, eax
imul ebx, ebx, 3
sub edi, ebx
lea ebx, [ecx + ecx]
sub edi, ebx
mov ebx, dword [esp + 0x18]
mov ebp, dword [ebx]
sub edi, esi
lea edi, [ebp + edi*4]
add edi, dword [ebx + 4]
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x30]
add ebp, ebx
cmp edi, ebp
jbe 0x100053a4
mov ebp, dword [esp + 0x28]
mov ebx, dword [esp + 0x24]
add ebx, ebp
imul ebx, ecx
mov ebp, eax
sub ebp, ebx
mov ebx, dword [0x100491bc]
sub ebp, esi
add ebx, 0xfffffffe
imul ebp, eax
imul ebx, edx
add ebp, esi
add ebx, ebp
add ebx, edi
mov dword [esp + 0x14], ebx
mov edi, dword [esp + 0x18]
add edi, 0x28
dec dword [esp + 0x1c]
mov dword [esp + 0x18], edi
jne 0x1000530d
lea edx, [ecx - 2]
imul edx, eax
add edx, ecx
imul edx, edx, 0xb4
lea eax, [esp + edx + 0x34]
push eax
call dword [0x1004bb64]
mov edi, dword [0x100491b4]
mov eax, dword [0x100491c4]
mov ebp, dword [0x100491c0]
mov ebx, dword [0x100491b8]
push 4
pop esi
sub esi, edi
sub esi, eax
imul esi, eax
mov eax, dword [0x100491bc]
lea ecx, [eax + ebp]
add ecx, ecx
sub esi, ecx
lea ecx, [ebx + ebp + 2]
imul ecx, ebx
add esi, ecx
xor ecx, ecx
imul esi, esi, 3
inc ecx
sub ecx, eax
add esi, dword [esp + 0x38]
imul ecx, ebp
lea ecx, [ecx*4 - 4]
imul ecx, eax
mov eax, ebx
sub eax, edi
lea eax, [ecx + eax*4]
mov ecx, dword [esp + 0x10]
add eax, dword [ecx + 0x50]
push eax
call fcn.10002d09
mov ecx, eax
mov eax, dword [0x100491c4]
add eax, eax
lea edx, [eax + ebx]
lea edx, [edx + edx - 2]
imul edx, ebp
add ecx, edx
mov edx, dword [0x100491bc]
lea esi, [edi + 2]
imul esi, edx
add esi, eax
lea eax, [ecx + esi*2]
mov ecx, dword [0x100491b0]
xor esi, esi
imul ecx, edx
inc esi
sub esi, edx
mov dword [esp + 0x20], eax
imul esi, edi
mov eax, ebx
imul eax, dword [0x100491c4]
lea edx, [ebp + ebp]
sub esi, edx
mov edx, dword [0x100491c4]
add esi, eax
add eax, eax
sub eax, ecx
mov dword [esp + 0x1c], ecx
mov ecx, dword [esp + 0x18]
add esi, esi
add edx, edx
sub esi, edx
add esi, dword [esp + 0x3c]
lea eax, [ecx + eax*2]
push eax
call fcn.10002d09
pop ecx
pop ecx
cmp dword [esp + 0x1c], eax
jne 0x100050be
mov eax, dword [0x100491bc]
imul eax, eax, 3
mov ecx, dword [0x100491b0]
mov dword [esp + 0x28], eax
mov eax, edi
imul eax, eax, 3
mov dword [esp + 0x24], eax
xor eax, eax
inc eax
sub eax, ecx
imul eax, ebp
sub eax, ebx
push dword [esp + 0x78]
imul eax, ebp
mov edx, edi
imul edx, edi
sub eax, edx
add eax, ecx
lea eax, [eax + eax + 4]
mov edx, eax
mov eax, dword [0x100491c4]
lea esi, [ebx + eax]
imul edi, eax
add esi, esi
sub edx, esi
push edx
lea edx, [ecx + 1]
imul edx, edx, 3
sub edx, dword [esp + 0x30]
sub edi, dword [esp + 0x20]
lea esi, [ebp + 1]
imul edx, ecx
imul esi, eax
imul esi, esi, 3
sub edx, esi
mov esi, dword [esp + 0x2c]
add esi, 0xfffffffd
imul esi, ebx
add edx, esi
sub edx, dword [esp + 0x30]
mov esi, dword [esp + 0x2c]
sub edi, ebp
imul edi, ebx
lea edx, [edx + esi + 0x1000]
lea esi, [edi + eax*2 + 0x2000]
sub esi, ebp
or edx, esi
push edx
push dword [esp + 0x28]
mov edx, ebx
imul edx, dword [0x100491bc]
add ebx, 2
inc edx
imul ebx, ecx
imul edx, eax
mov eax, dword [esp + 0x20]
sub ebx, edx
add ebx, dword [eax + 0x34]
push ebx
call dword [esp + 0x78]
add esp, 0x14
mov dword [esp + 0x14], eax
test eax, eax
jne 0x1000563b
mov ecx, dword [0x100491b8]
mov eax, dword [0x100491b4]
mov esi, dword [0x100491c4]
mov edx, dword [0x100491b0]
mov edi, dword [0x100491bc]
mov ebx, ecx
sub ebx, eax
sub ebx, esi
sub ebx, edx
inc ebx
imul ebx, esi
lea esi, [ecx + 1]
imul esi, ecx
sub ebx, esi
mov esi, dword [0x100491c0]
push dword [esp + 0x78]
lea ebp, [edi + 1]
imul ebp, esi
sub ebx, ebp
mov ebp, eax
imul ebp, edx
sub ebx, ebp
add ebx, 4
push ebx
mov ebx, esi
imul ebx, edi
inc ebx
imul ebx, edi
lea ebx, [ebx + ebx - 2]
imul ebx, dword [0x100491c4]
lea ebp, [edx + eax*2]
lea ebp, [edx + ebp + 2]
imul ebp, eax
sub ebx, ebp
lea edx, [ecx + edx*2 + 0x1000]
add edx, esi
lea edx, [ebx + edx*2]
mov ebx, esi
imul ebx, eax
add ebx, edi
imul ebx, eax
sub ebx, esi
sub ebx, edi
add ebx, ecx
add ebx, dword [0x100491c4]
sub eax, ecx
imul ebx, ebx, 3
shl eax, 2
mov ecx, esi
shl ecx, 3
add ebx, 0x1000
sub eax, ecx
add eax, dword [esp + 0x24]
or edx, ebx
push edx
push eax
push 0
call dword [esp + 0x78]
add esp, 0x14
mov dword [esp + 0x14], eax
test eax, eax
je 0x100050be
mov eax, dword [0x100491b0]
mov esi, dword [0x100491c4]
lea ecx, [eax + 2]
imul ecx, esi
push 0x10
pop ebx
sub ebx, ecx
xor ecx, ecx
inc ecx
mov edx, dword [0x100491b8]
sub ecx, eax
imul ecx, dword [0x100491bc]
lea ebx, [ecx + ebx*2]
mov ecx, dword [0x100491c0]
xor ebp, ebp
imul ecx, ecx, 3
inc ebp
sub ebx, ecx
mov ecx, dword [0x100491b4]
sub ebp, ecx
sub ebp, eax
lea edi, [edx + edx]
lea ebp, [edi + ebp*2]
imul ebp, ecx
lea ebx, [ebp + ebx*2]
sub ebx, edi
mov edi, dword [0x100491c0]
push ebx
mov ebp, esi
imul ebp, esi
mov ebx, edx
imul ebx, edi
sub ebp, ebx
mov ebx, ecx
imul ebx, ecx
sub ebp, ebx
inc ebp
imul ebp, edi
xor edi, edi
inc edi
sub edi, edx
sub edi, eax
imul edi, esi
xor esi, esi
inc esi
sub esi, edx
imul esi, dword [0x100491bc]
add ebp, edi
add ebp, esi
add ecx, ecx
sub ebp, ecx
add ebp, eax
imul ebp, ebp, 5
add ebp, 8
push ebp
call dword [0x1004bf20]
push eax
call dword [0x1004bb5c]
mov ecx, dword [0x100491b0]
lea edx, [ecx + 1]
imul edx, dword [0x100491b4]
imul edx, dword [0x100491c4]
mov esi, eax
mov eax, dword [0x100491c0]
lea edi, [edx + eax + 2]
mov edx, dword [0x100491b8]
imul edi, eax
lea ebx, [edx + 2]
imul ebx, edx
sub ebx, edi
mov edi, dword [0x100491bc]
lea ebp, [edi + 4]
imul ebp, dword [0x100491b4]
sub ebx, ebp
add ebx, ecx
shl ebx, 7
add esi, ebx
jne 0x10005772
inc esi
sub esi, ecx
imul esi, dword [0x100491b4]
sub esi, edi
add esi, eax
imul esi, dword [0x100491c4]
push dword [esp + 0x78]
mov ebx, eax
imul ebx, eax
sub esi, ebx
lea eax, [ecx + ecx]
sub esi, eax
sub esi, edi
add esi, edx
imul esi, esi, 5
add esi, 0x8000
push esi
push 0
push dword [esp + 0x20]
call dword [esp + 0x78]
add esp, 0x10
jmp 0x100050be
mov eax, dword [esp + 0x14]
mov dword [esi + 4], eax
mov ecx, dword [0x100491b8]
mov eax, dword [0x100491b4]
lea edx, [ecx + eax + 1]
imul edx, ecx
mov ecx, dword [0x100491bc]
add edx, eax
add eax, ecx
lea eax, [eax*4 - 4]
imul eax, dword [0x100491c0]
mov edi, 0x400
sub edi, ecx
lea edx, [edx + edi*2]
add edx, dword [0x100491b0]
mov edi, dword [esp + 0x10]
movzx ecx, word [edi + 0x16]
lea eax, [eax + edx*4]
and eax, ecx
neg eax
sbb eax, eax
neg eax
mov dword [esi + 0x14], eax
mov eax, dword [esp + 0x64]
mov dword [esi + 0x1c], eax
mov eax, dword [esp + 0x68]
mov dword [esi + 0x20], eax
mov eax, dword [esp + 0x6c]
mov dword [esi + 0x24], eax
mov eax, dword [esp + 0x70]
mov dword [esi + 0x28], eax
mov eax, dword [esp + 0x74]
mov dword [esi + 0x2c], eax
mov eax, dword [esp + 0x78]
mov dword [esi + 0x34], eax
mov eax, dword [0x100491c4]
mov ecx, dword [0x100491b4]
mov ebx, eax
imul eax, eax, 0xc
imul ebx, dword [0x100491bc]
mov edx, ecx
shl edx, 2
inc ebx
imul ebx, ecx
mov ecx, dword [0x100491b8]
add ebx, ecx
lea ebx, [ebx*4 - 4]
imul ebx, dword [0x100491c0]
push 4
pop ebp
sub ebp, edx
imul ebp, ecx
add ebx, ebp
sub ebx, eax
add ebx, edx
add ebx, dword [esp + 0x38]
xor ebp, ebp
mov dword [esi + 0x3c], ebx
mov edx, dword [0x100491b8]
mov eax, dword [edi + 0x54]
mov edi, dword [0x100491b0]
mov ecx, dword [0x100491c4]
mov ebx, edx
imul ebx, edx
imul ebx, edi
inc ebp
mov dword [esp + 0x28], eax
mov eax, dword [0x100491b4]
sub ebx, eax
add ebx, 5
sub ebp, eax
imul ebx, ecx
imul ebp, eax
add ebx, ebp
mov ebp, dword [0x100491c0]
dec ebp
imul ebp, edx
add ebx, ebp
sub ebx, dword [0x100491bc]
add ebx, dword [esp + 0x28]
add ebx, edi
mov ebp, dword [0x100491bc]
inc ebp
imul ebp, edx
mov edx, dword [0x100491c0]
sub edx, ebp
mov ebp, dword [0x100491c0]
imul ebp, edi
sub ebp, eax
imul ebp, ebp, 3
sub edx, edi
add edx, eax
imul edx, edx, 3
add edx, dword [esp + 0x60]
sub ebp, 3
imul ebp, ecx
add ebp, edx
cmp ebp, ebx
jb 0x10005c88
mov edx, dword [0x100491b8]
push dword [esp + 0x78]
lea edi, [eax*4 - 4]
imul edi, ecx
xor ebx, ebx
inc ebx
sub ebx, edx
lea edi, [edi + ebx*4]
push edi
mov edi, dword [0x100491c0]
mov ebx, edi
imul ebx, eax
imul ebx, eax
mov ebp, ecx
imul ebp, dword [0x100491bc]
add ebx, edx
mov edx, dword [0x100491b0]
lea ebx, [ebx + ebp + 2]
imul ebx, edi
mov edi, edx
imul edi, edx
sub edi, ebx
sub edi, eax
add edi, ecx
lea edx, [edi + ecx + 0x1000]
add ecx, eax
add ecx, dword [0x100491bc]
mov eax, dword [esp + 0x30]
imul ecx, ecx, 3
push edx
sub eax, ecx
push eax
push dword [esp + 0x24]
call dword [esp + 0x78]
mov ecx, dword [esp + 0x24]
mov edi, eax
mov eax, dword [0x100491b4]
sub eax, dword [0x100491c0]
sub eax, dword [0x100491c4]
imul eax, eax, 3
add eax, dword [ecx + 0x54]
push eax
push dword [esp + 0x74]
push edi
call dword [0x1004bf28]
mov eax, dword [0x100491b4]
mov ecx, dword [0x100491c4]
mov edx, dword [0x100491c0]
mov ebx, ecx
sub ebx, eax
dec ebx
imul ebx, edx
mov ebp, ecx
imul ebp, ebp, 3
add ebx, ebp
mov ebp, eax
imul ebp, eax
imul ebp, ecx
add ebp, 0x26b
imul ebp, dword [0x100491bc]
sub ebx, eax
add ebx, dword [0x100491b0]
imul ebx, ebx, 0x26c
add ebx, ebp
mov ebp, edx
imul ebp, edx
imul ebp, dword [0x100491b0]
sub ebx, edx
mov edx, dword [0x100491b8]
lea ebp, [edx + ebp*2]
add ebp, edx
add ebp, eax
add ebp, eax
add ebp, ecx
add ebp, ecx
imul ebp, eax
mov eax, dword [esp + 0x7c]
add ebx, ebx
sub ebx, ebp
add ebx, dword [eax + 0x3c]
lea edx, [ebx + edi]
mov dword [esi], edx
mov ecx, dword [0x100491b4]
mov eax, dword [0x100491c0]
mov edi, ecx
imul edi, dword [0x100491c4]
mov ebx, eax
sub ebx, edi
mov edi, eax
imul edi, eax
lea edi, [edi + ecx + 1]
imul edi, dword [0x100491b8]
add eax, 3
imul eax, dword [0x100491bc]
add ebx, ebx
sub ebx, edi
sub ebx, eax
mov eax, dword [esp + 0x34]
add ebx, ecx
lea eax, [eax + ebx*2]
mov dword [edx + 0x34], eax
mov edi, dword [0x100491b8]
mov edx, dword [0x100491bc]
mov eax, dword [0x100491c0]
mov ebx, dword [0x100491b4]
mov ecx, edi
imul ecx, edx
lea ebp, [ecx + eax + 3]
imul ebp, dword [0x100491c4]
mov ecx, ebx
imul ecx, edx
add ecx, eax
imul ecx, ebx
add ebp, ecx
mov ecx, dword [0x100491b0]
sub ebp, eax
add ebp, edi
add ebp, ecx
imul ecx, edx
shl ebp, 6
add ebp, esi
push ebp
mov ebp, ebx
mov ebx, dword [0x100491c4]
imul ebp, ebx
sub ecx, ebp
imul ecx, eax
lea ebp, [eax + 2]
imul ebp, edx
push dword [esp + 0x34]
add ecx, ebp
mov ebp, edi
imul ecx, ecx, 3
imul ebp, ebx
inc ebp
imul ebp, edx
push 4
pop edx
sub edx, ebp
mov ebp, eax
imul edx, edx, 3
sub eax, ebx
imul ebp, ebp, 3
imul eax, eax, 3
sub edx, ebp
imul edx, edi
add edx, dword [esp + 0x88]
sub eax, 3
imul eax, dword [0x100491b4]
add edx, ecx
add eax, edx
push eax
push dword [esp + 0x88]
call fcn.10002d48
add esp, 0x30
test eax, eax
je 0x10005c88
mov edi, dword [0x100491c0]
mov edx, dword [0x100491b8]
mov ebx, dword [0x100491b0]
mov eax, edi
imul eax, edi
mov dword [esp + 0x18], eax
mov eax, dword [0x100491b4]
mov ecx, edi
imul ecx, eax
lea ecx, [ecx + edx - 3]
imul ecx, dword [0x100491c4]
lea ebp, [ebx - 2]
imul ebp, eax
add ecx, ebp
sub ecx, dword [esp + 0x18]
mov ebp, dword [esi]
add ecx, edx
add ecx, ebx
add ecx, dword [0x100491bc]
imul ecx, ecx, 5
add ecx, dword [ebp + 0x34]
mov ebp, dword [esp + 0x10]
sub ecx, dword [ebp + 0x34]
je 0x10005bc7
mov ebp, edx
imul ebp, ebx
mov ebx, dword [esp + 0x18]
lea ebx, [ebx + ebp + 2]
mov ebp, dword [0x100491bc]
imul ebx, edi
lea ebp, [edx + ebp - 3]
imul ebp, dword [0x100491c4]
sub ebp, ebx
mov ebx, dword [0x100491bc]
add ebx, 2
imul ebx, eax
sub ebp, ebx
imul ebp, ebp, 5
add ebp, ecx
mov ecx, dword [0x100491c4]
imul eax, ecx
dec eax
imul eax, edi
add eax, edx
add eax, ecx
shl eax, 7
add eax, esi
push ebp
push eax
call fcn.10003b7c
mov edi, eax
mov eax, dword [0x100491b4]
pop ecx
pop ecx
lea ecx, [eax + eax]
mov edx, ecx
mov ecx, dword [0x100491c4]
imul eax, ecx
sub eax, dword [0x100491b8]
mov ebx, ecx
sub ebx, edx
mov edx, dword [0x100491bc]
add ebx, dword [0x100491b0]
sub eax, edx
lea eax, [eax + eax - 2]
imul eax, dword [0x100491c0]
add ebx, edx
lea edi, [edi + ebx*2]
add edi, eax
mov dword [esi + 0x18], edi
jmp 0x10005bce
mov dword [esi + 0x18], 1
mov eax, dword [0x100491c4]
mov edx, dword [0x100491c0]
lea ecx, [eax + 1]
imul ecx, dword [0x100491bc]
sub edx, ecx
sub edx, dword [0x100491b8]
add edx, eax
shl edx, 8
add edx, esi
push edx
call fcn.10003f08
pop ecx
test eax, eax
je 0x10005c88
mov eax, dword [0x100491b8]
mov ecx, dword [0x100491c4]
mov edx, eax
imul edx, eax
mov eax, dword [0x100491b4]
imul edx, eax
imul edx, ecx
imul edx, dword [0x100491b0]
mov edi, eax
sub edi, edx
inc edi
inc edi
imul edi, eax
mov eax, dword [0x100491c0]
inc eax
imul eax, ecx
sub edi, eax
shl edi, 6
add edi, esi
push edi
call fcn.100035c7
pop ecx
test eax, eax
je 0x10005c88
mov eax, dword [0x100491b8]
inc eax
imul eax, dword [0x100491bc]
imul eax, eax, 0xc0
mov ecx, 0xc0
sub ecx, eax
mov eax, dword [0x100491b0]
imul ecx, dword [0x100491c0]
sub eax, dword [0x100491c4]
add ecx, esi
imul eax, eax, 0xc0
add eax, ecx
push eax
call fcn.10003a70
pop ecx
test eax, eax
jne 0x10005c94
push esi
call fcn.10004b03
pop ecx
jmp 0x100050be
mov eax, dword [esi]
mov ebx, dword [eax + 0x28]
test ebx, ebx
je 0x10005d41
cmp dword [esi + 0x14], 0
je 0x10005cfe
mov eax, dword [0x100491b8]
mov ecx, dword [0x100491b0]
mov edx, dword [0x100491bc]
mov edi, ecx
mov ebp, eax
imul edi, edx
imul ebp, eax
sub ebp, edi
mov edi, dword [0x100491c0]
add ebp, edi
imul ebp, eax
mov eax, dword [0x100491b4]
imul eax, ecx
xor ecx, ecx
inc ecx
sub ecx, eax
sub ecx, dword [0x100491c4]
add ebp, edi
imul ecx, edx
add ecx, ebp
lea eax, [ebx + ecx*2]
add eax, dword [esp + 0x14]
mov dword [0x1004bf30], eax
mov dword [esi + 0x10], 1
jmp 0x10005d45
mov eax, dword [0x100491c4]
lea ecx, [eax + 1]
imul ecx, dword [0x100491bc]
mov eax, dword [0x100491b0]
mov edx, eax
sub edx, ecx
mov ecx, dword [0x100491b4]
imul ecx, eax
sub edx, dword [0x100491c0]
imul ecx, eax
lea eax, [ecx + ecx - 4]
imul eax, dword [0x100491b8]
add eax, ebx
lea eax, [eax + edx*2]
add eax, dword [esp + 0x14]
mov dword [esi + 0x38], eax
jmp 0x10005d45
and dword [esi + 0x38], 0
mov eax, esi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x48
ret