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

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff8
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x100ea829
mov eax, dword fs:[0]
push eax
push ebx
sub esp, 0x1e0
mov eax, dword [0x101114bc]
xor eax, ebp
mov dword [ebp - 0x14], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, dword [ebx + 8]
mov dword [ebp - 0x13c], esi
cmp dword [esi + 0x58], 0
jge 0x1004032c
test byte [esi + 4], 2
lea eax, [ebp - 0x18c]
mov dword [ebp - 0x184], 0xffffffff
lea ecx, [esi + 0x40]
mov dword [ebp - 0x180], 0
mov dword [ebp - 0x17c], 0
mov dword [ebp - 0x178], 0
mov dword [ebp - 0x174], 0
mov dword [ebp - 0x18c], bind
push eax
mov dword [ebp - 0x188], 0x1b00d9
je 0x10040320
mov dword [ebp - 0x188], 0x20002
call fcn.100457c0
mov eax, dword [esi + 0x40]
dec eax
mov dword [esi + 0x58], eax
mov eax, dword [esi + 0x14]
mov dword [esi + 8], 0
mov dword [esi + 0x20], 0
mov dword [esi + 0x1c], 0
mov dword [esi + 0x24], 0
mov dword [esi + 0x28], 0
mov dword [esi + 0x2c], 0
mov dword [esi + 0x30], 0
test eax, eax
je 0x1004036d
push eax
call fcn.1002d330
add esp, 4
mov eax, dword [esi + 0x18]
test eax, eax
je 0x1004037d
push eax
call fcn.1002d330
add esp, 4
xor edx, edx
mov dword [esi + 0x14], 0
mov dword [esi + 0x18], 0
mov dword [ebp - 0x1dc], 0
mov dword [ebp - 0x1e0], 0
mov dword [ebp - 0x15c], edx
mov dword [ebp - 0x1d8], edx
mov dword [ebp - 4], edx
xor edi, edi
mov dword [ebp - 0x1b0], edx
mov dword [ebp - 0x1b4], edx
mov dword [ebp - 0x150], edi
mov dword [ebp - 0x1ac], edi
mov byte [ebp - 4], 1
lea edx, [edi + 8]
mov ecx, dword [esi + 0x4c]
mov dword [ebp - 0x158], ecx
test ecx, ecx
jle 0x1004041f
cmp ecx, edx
mov eax, ecx
cmovl eax, edx
mov dword [ebp - 0x120], eax
test eax, eax
jle 0x1004041f
imul eax, eax, 0xc4
push eax
call fcn.1002d300
mov ecx, dword [ebp - 0x120]
lea edx, [edi + 8]
mov dword [ebp - 0x1d8], eax
add esp, 4
mov dword [ebp - 0x1dc], ecx
mov ecx, dword [ebp - 0x158]
mov dword [ebp - 0x15c], eax
mov dword [ebp - 0x1e0], ecx
mov eax, dword [esi + 0x34]
mov dword [ebp - 0x154], eax
test eax, eax
jle 0x1004046d
cmp eax, 8
mov esi, eax
cmovl esi, edx
test esi, esi
jle 0x1004046d
lea eax, [esi + esi*2]
shl eax, 3
push eax
call fcn.1002d300
mov edi, eax
add esp, 4
mov dword [ebp - 0x1ac], edi
mov eax, dword [ebp - 0x154]
mov ecx, dword [ebp - 0x158]
mov dword [ebp - 0x150], edi
mov dword [ebp - 0x1b0], esi
mov esi, dword [ebp - 0x15c]
imul ecx, ecx, 0xc4
mov dword [ebp - 0x1b4], eax
push ecx
push 0
push esi
call fcn.10088c20
mov eax, dword [ebp - 0x154]
lea eax, [eax + eax*2]
shl eax, 3
push eax
push 0
push edi
call fcn.10088c20
mov eax, dword [ebp - 0x13c]
add esp, 0x18
mov dword [ebp - 0x144], 0
cmp dword [eax + 0x4c], 0
jle 0x10040602
xor edx, edx
add esi, 0xa4
mov dword [ebp - 0x134], edx
mov dword [ebp - 0x124], esi
nop
mov ecx, dword [eax + 0x54]
add ecx, edx
mov dword [esi - 4], 0xffffffff
xor edx, edx
mov dword [ebp - 0x148], ecx
cmp dword [eax + 0x34], edx
jle 0x10040673
or ecx, 0xffffffff
cmp ecx, 0xffffffff
jne 0x10040525
mov ecx, dword [eax + 0x3c]
mov eax, dword [ebp - 0x148]
mov eax, dword [eax + 0x74]
cmp eax, dword [ecx + edx*4]
jne 0x1004050d
mov dword [esi - 4], edx
mov ecx, edx
jmp 0x10040510
mov ecx, dword [esi - 4]
mov eax, dword [ebp - 0x13c]
inc edx
cmp edx, dword [eax + 0x34]
jl 0x100404f0
cmp ecx, 0xffffffff
je 0x10040673
mov eax, dword [ebp - 0x148]
push dword [eax + 0xc]
mov esi, dword [eax]
push esi
call fcn.1004c1b0
mov ecx, dword [ebp - 0x124]
push eax
add ecx, 0xffffff5c
push esi
push ecx
mov dword [ebp - 0x120], ecx
call fcn.10046580
add esp, 0x14
test eax, eax
je 0x10040673
mov eax, dword [ebp - 0x120]
mov edx, 0x100f476c
mov esi, dword [ebp - 0x124]
mov eax, dword [eax + 0xa0]
lea ecx, [eax + eax*2]
mov eax, dword [ebp - 0x148]
mov dword [ebp - 0x130], ecx
mov eax, dword [eax + 0x30]
test eax, eax
cmovne edx, eax
mov dword [esi - 8], edx
cmp word [edx], 0
je 0x100405b3
movzx eax, word [edx + 2]
test ax, ax
je 0x100405ad
mov ecx, eax
cmp dword [esi], ecx
cmovge ecx, dword [esi]
add edx, 4
mov dword [esi], ecx
cmp word [edx], 0
jne 0x10040592
mov ecx, dword [ebp - 0x130]
mov edx, dword [ebp - 0x130]
inc dword [edi + ecx*8]
mov ecx, dword [esi]
mov eax, dword [ebp - 0x13c]
cmp dword [edi + edx*8 + 4], ecx
cmovge ecx, dword [edi + edx*8 + 4]
add esi, 0xc4
mov dword [edi + edx*8 + 4], ecx
mov ecx, dword [ebp - 0x144]
mov edx, dword [ebp - 0x134]
inc ecx
add edx, 0x78
mov dword [ebp - 0x144], ecx
mov dword [ebp - 0x124], esi
mov dword [ebp - 0x134], edx
cmp ecx, dword [eax + 0x4c]
jl 0x100404d0
mov eax, dword [ebp - 0x158]
xor esi, esi
mov dword [ebp - 0x124], esi
test eax, eax
jle 0x10040ac4
mov edx, dword [ebp - 0x15c]
add edx, 0xb4
mov dword [ebp - 0x144], eax
mov dword [ebp - 0x11c], edx
mov eax, dword [edx - 0x14]
mov ecx, dword [edx - 0x10]
add ecx, 0x20
sar ecx, 5
lea esi, [eax + eax*2]
mov dword [ebp - 0x12c], ecx
mov eax, dword [edx - 4]
mov dword [ebp - 0x148], esi
mov dword [ebp - 0x120], eax
cmp ecx, eax
jle 0x100406f7
test eax, eax
je 0x1004067f
cdq
sub eax, edx
mov edx, dword [ebp - 0x11c]
sar eax, 1
add eax, dword [ebp - 0x120]
jmp 0x10040684
mov byte [ebp - 0x13d], 0
jmp 0x10041a85
mov eax, 8
cmp eax, ecx
mov edi, ecx
cmovg edi, eax
mov eax, edi
mov dword [ebp - 0x130], edi
mov edi, dword [ebp - 0x150]
cmp eax, dword [edx - 4]
jle 0x100406f7
shl eax, 2
push eax
call fcn.1002d300
mov edx, dword [ebp - 0x11c]
add esp, 4
mov dword [ebp - 0x120], eax
cmp dword [edx], 0
je 0x100406e6
mov ecx, dword [edx - 8]
shl ecx, 2
push ecx
push dword [edx]
push eax
call fcn.10088120
mov eax, dword [ebp - 0x11c]
push dword [eax]
call fcn.1002d330
mov edx, dword [ebp - 0x11c]
add esp, 0x10
mov eax, dword [ebp - 0x120]
mov ecx, dword [ebp - 0x12c]
mov dword [edx], eax
mov eax, dword [ebp - 0x130]
mov dword [edx - 4], eax
lea eax, [ecx*4]
mov dword [edx - 8], ecx
push eax
push 0
push dword [edx]
call fcn.10088c20
add esp, 0xc
cmp dword [edi + esi*8 + 0xc], 0
jne 0x100407d1
mov ecx, dword [edi + esi*8 + 4]
mov eax, dword [edi + esi*8 + 0x10]
add ecx, 0x20
sar ecx, 5
mov dword [ebp - 0x12c], ecx
cmp ecx, eax
jle 0x100407b7
test eax, eax
je 0x10040746
cdq
sub eax, edx
mov edx, dword [edi + esi*8 + 0x10]
sar eax, 1
add eax, edx
jmp 0x1004074f
mov edx, dword [edi + esi*8 + 0x10]
mov eax, 8
cmp eax, ecx
mov edi, ecx
cmovg edi, eax
mov eax, edi
mov dword [ebp - 0x130], edi
mov edi, dword [ebp - 0x150]
cmp eax, edx
jle 0x100407b7
shl eax, 2
push eax
call fcn.1002d300
mov edx, dword [edi + esi*8 + 0x14]
add esp, 4
mov dword [ebp - 0x120], eax
test edx, edx
je 0x100407a3
mov ecx, dword [edi + esi*8 + 0xc]
shl ecx, 2
push ecx
push edx
push eax
call fcn.10088120
push dword [edi + esi*8 + 0x14]
call fcn.1002d330
mov eax, dword [ebp - 0x120]
add esp, 0x10
mov ecx, dword [ebp - 0x12c]
mov dword [edi + esi*8 + 0x14], eax
mov eax, dword [ebp - 0x130]
mov dword [edi + esi*8 + 0x10], eax
lea eax, [ecx*4]
mov dword [edi + esi*8 + 0xc], ecx
push eax
push 0
push dword [edi + esi*8 + 0x14]
call fcn.10088c20
add esp, 0xc
mov edx, dword [ebp - 0x11c]
mov eax, dword [edx - 0x18]
mov dword [ebp - 0x128], eax
movzx ecx, word [eax]
test cx, cx
je 0x100408cc
nop dword [eax]
movzx eax, word [eax + 2]
test ax, ax
je 0x100408c6
movzx edi, cx
cmp edi, eax
ja 0x100408ab
nop dword [eax + eax]
mov eax, dword [ebp - 0x148]
mov ecx, edi
and ecx, 0x1f
mov edx, 1
shl edx, cl
mov esi, edi
mov ecx, dword [ebp - 0x150]
sar esi, 5
mov dword [ebp - 0x120], edx
mov eax, dword [ecx + eax*8 + 0x14]
test dword [eax + esi*4], edx
jne 0x10040892
mov eax, dword [ebp - 0x11c]
add eax, 0xffffff4c
push edi
push eax
call fcn.1004bea0
mov edx, dword [ebp - 0x11c]
add esp, 8
test eax, eax
je 0x10040898
inc dword [edx - 0xc]
mov eax, dword [ebp - 0x148]
mov ecx, dword [ebp - 0x150]
inc dword [ecx + eax*8 + 8]
mov eax, dword [edx]
mov ecx, dword [ebp - 0x120]
mov edx, dword [ebp - 0x150]
or dword [eax + esi*4], ecx
mov eax, dword [ebp - 0x148]
mov eax, dword [edx + eax*8 + 0x14]
or dword [eax + esi*4], ecx
inc dword [ebp - 0x124]
mov edx, dword [ebp - 0x11c]
mov eax, dword [ebp - 0x128]
inc edi
movzx eax, word [eax + 2]
cmp edi, eax
jle 0x10040810
mov eax, dword [ebp - 0x128]
add eax, 4
mov dword [ebp - 0x128], eax
movzx ecx, word [eax]
test cx, cx
jne 0x100407f0
mov edi, dword [ebp - 0x150]
add edx, 0xc4
sub dword [ebp - 0x144], 1
mov dword [ebp - 0x11c], edx
jne 0x10040630
mov esi, dword [ebp - 0x15c]
mov eax, dword [ebp - 0x158]
add esi, 0xb8
mov dword [ebp - 0x138], eax
nop dword [eax]
mov edi, dword [esi - 0x10]
cmp edi, dword [esi + 4]
jle 0x10040949
lea eax, [edi*4]
push eax
call fcn.1002d300
mov edx, dword [esi + 8]
add esp, 4
mov dword [ebp - 0x120], eax
test edx, edx
je 0x10040943
mov ecx, dword [esi]
shl ecx, 2
push ecx
push edx
push eax
call fcn.10088120
push dword [esi + 8]
call fcn.1002d330
mov eax, dword [ebp - 0x120]
add esp, 0x10
mov dword [esi + 8], eax
mov dword [esi + 4], edi
mov ecx, dword [esi - 4]
mov eax, dword [esi - 0xc]
mov dword [ebp - 0x144], ecx
lea eax, [ecx + eax*4]
mov dword [ebp - 0x148], eax
cmp ecx, eax
jae 0x10040a80
xor edx, edx
mov dword [ebp - 0x134], edx
nop
mov eax, dword [ecx]
mov dword [ebp - 0x160], eax
test eax, eax
je 0x10040a62
xor ecx, ecx
mov edi, 1
mov dword [ebp - 0x130], ecx
mov dword [ebp - 0x128], edi
test edi, eax
je 0x10040a44
and edx, 0xffffffe0
add edx, ecx
mov ecx, dword [esi + 4]
mov dword [ebp - 0x12c], edx
mov edx, dword [esi]
mov dword [ebp - 0x120], edx
cmp edx, ecx
jne 0x10040a24
lea edi, [edx + 1]
test ecx, ecx
je 0x100409cd
mov eax, ecx
cdq
sub eax, edx
mov edx, dword [ebp - 0x120]
sar eax, 1
add eax, ecx
jmp 0x100409d2
mov eax, 8
cmp eax, edi
cmovg edi, eax
cmp edi, ecx
jle 0x10040a1e
lea eax, [edi*4]
push eax
call fcn.1002d300
mov edx, dword [esi + 8]
add esp, 4
mov dword [ebp - 0x120], eax
test edx, edx
je 0x10040a16
mov ecx, dword [esi]
shl ecx, 2
push ecx
push edx
push eax
call fcn.10088120
push dword [esi + 8]
call fcn.1002d330
mov eax, dword [ebp - 0x120]
add esp, 0x10
mov edx, dword [esi]
mov dword [esi + 8], eax
mov dword [esi + 4], edi
mov edi, dword [ebp - 0x128]
mov eax, dword [esi + 8]
mov ecx, dword [ebp - 0x12c]
mov dword [eax + edx*4], ecx
inc dword [esi]
mov ecx, dword [ebp - 0x130]
mov eax, dword [ebp - 0x160]
mov edx, dword [ebp - 0x134]
inc ecx
rol edi, 1
mov dword [ebp - 0x130], ecx
mov dword [ebp - 0x128], edi
cmp ecx, 0x20
jl 0x10040993
mov ecx, dword [ebp - 0x144]
add ecx, 4
add edx, 0x20
mov dword [ebp - 0x144], ecx
mov dword [ebp - 0x134], edx
cmp ecx, dword [ebp - 0x148]
jb 0x10040970
mov eax, dword [esi - 4]
test eax, eax
je 0x10040aa5
push eax
mov dword [esi - 8], 0
mov dword [esi - 0xc], 0
call fcn.1002d330
add esp, 4
mov dword [esi - 4], 0
add esi, 0xc4
sub dword [ebp - 0x138], 1
jne 0x10040900
mov edi, dword [ebp - 0x150]
mov esi, dword [ebp - 0x124]
cmp dword [ebp - 0x154], 0
jle 0x10040b0d
lea esi, [edi + 0x14]
mov edi, dword [ebp - 0x154]
mov eax, dword [esi]
test eax, eax
je 0x10040af9
push eax
mov dword [esi - 4], 0
mov dword [esi - 8], 0
call fcn.1002d330
add esp, 4
mov dword [esi], 0
add esi, 0x18
sub edi, 1
jne 0x10040ad6
mov edi, dword [ebp - 0x150]
mov esi, dword [ebp - 0x124]
test edi, edi
je 0x10040b3c
push edi
mov dword [ebp - 0x1b0], 0
mov dword [ebp - 0x1b4], 0
call fcn.1002d330
add esp, 4
xor eax, eax
mov dword [ebp - 0x150], eax
mov dword [ebp - 0x1ac], eax
xor eax, eax
mov dword [ebp - 0x1bc], 0
mov dword [ebp - 0x1c0], 0
mov dword [ebp - 0x154], eax
mov dword [ebp - 0x1b8], eax
mov byte [ebp - 4], 2
mov dword [ebp - 0x1e8], eax
mov dword [ebp - 0x1ec], eax
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x1e4], eax
mov byte [ebp - 4], 3
mov eax, 8
test esi, esi
jle 0x10040bb7
cmp esi, eax
mov edi, esi
cmovl edi, eax
test edi, edi
jle 0x10040bb7
mov eax, edi
shl eax, 4
push eax
call fcn.1002d300
mov dword [ebp - 0x1b8], eax
add esp, 4
mov dword [ebp - 0x154], eax
mov eax, 8
mov dword [ebp - 0x1bc], edi
mov dword [ebp - 0x1c0], esi
test esi, esi
jle 0x10040bf4
cmp esi, 8
mov edi, esi
cmovl edi, eax
test edi, edi
jle 0x10040bf4
lea eax, [edi*8]
sub eax, edi
shl eax, 2
push eax
call fcn.1002d300
mov dword [ebp - 0x1e4], eax
add esp, 4
mov dword [ebp - 0x148], eax
mov dword [ebp - 0x1e8], edi
mov ecx, esi
mov dword [ebp - 0x1ec], esi
shl ecx, 4
push ecx
push 0
push dword [ebp - 0x154]
call fcn.10088c20
lea eax, [esi*8]
sub eax, esi
shl eax, 2
push eax
push 0
push dword [ebp - 0x148]
call fcn.10088c20
mov edx, dword [ebp - 0x158]
xor eax, eax
xor ecx, ecx
mov dword [ebp - 0x11c], eax
xor esi, esi
mov dword [ebp - 0x124], ecx
add esp, 0x18
mov dword [ebp - 0x120], esi
test edx, edx
jle 0x10040ef5
mov edi, dword [ebp - 0x15c]
add edi, 0x98
mov dword [ebp - 0x134], eax
mov dword [ebp - 0x138], edi
mov dword [ebp - 0x12c], edx
nop
mov edx, dword [edi + 0x10]
test edx, edx
je 0x10040ecf
add dword [ebp - 0x124], edx
mov eax, ecx
mov ecx, dword [ebp - 0x148]
shl eax, 4
add eax, dword [ebp - 0x154]
mov dword [edi - 4], eax
lea eax, [esi*8]
sub eax, esi
add esi, edx
mov dword [ebp - 0x120], esi
lea ecx, [ecx + eax*4]
mov eax, dword [ebp - 0x13c]
mov dword [edi], ecx
mov edx, dword [eax + 0x54]
add edx, dword [ebp - 0x134]
mov dword [ebp - 0x128], edx
mov eax, dword [edx + 0x10]
mov dword [edi - 0x1c], eax
mov eax, dword [edi + 0x28]
mov dword [edi - 0x14], eax
mov eax, dword [edi + 0x20]
mov dword [edi - 0x18], 0
mov dword [edi - 0x10], eax
mov dword [edi - 0xc], ecx
mov al, byte [edx + 0x14]
mov byte [edi - 8], al
mov al, byte [edx + 0x18]
mov byte [edi - 7], al
movss xmm1, dword [edx + 0x10]
comiss xmm1, dword [0x100f0af8]
jbe 0x10040d4b
mov esi, dword [ebp - 0x138]
mov eax, 0x100
mov edi, dword [edi - 0x7c]
cwde
mov esi, dword [esi - 0x94]
movzx ecx, byte [edi + esi + 6]
movsx ecx, cx
imul ecx, eax
movzx eax, byte [edi + esi + 7]
add cx, ax
mov eax, 0x100
movsx edx, cx
movzx ecx, byte [edi + esi + 4]
cwde
movsx ecx, cx
imul ecx, eax
movzx eax, byte [edi + esi + 5]
mov edi, dword [ebp - 0x138]
add cx, ax
movsx eax, cx
sub eax, edx
movd xmm0, eax
jmp 0x10040d71
mov ecx, dword [edi - 0x84]
mov eax, dword [edi - 0x94]
xorps xmm1, xmmword [0x100f0c60]
movzx edx, byte [ecx + eax + 0x13]
movzx eax, byte [ecx + eax + 0x12]
shl eax, 8
add edx, eax
movd xmm0, edx
cvtdq2ps xmm0, xmm0
mov eax, dword [ebp - 0x13c]
xor ecx, ecx
mov dword [ebp - 0x130], ecx
mov eax, dword [eax + 0x10]
divss xmm1, xmm0
mov dword [ebp - 0x138], eax
movss dword [ebp - 0x160], xmm1
cmp dword [edi + 0x20], ecx
jle 0x10040ec3
mov dword [ebp - 0x144], ecx
nop word [eax + eax]
mov eax, dword [edi + 0x28]
lea esi, [edi - 0x98]
push dword [eax + ecx*4]
push esi
call fcn.1004bea0
add esp, 8
lea ecx, [ebp - 0x168]
push ecx
lea ecx, [ebp - 0x170]
push ecx
lea ecx, [ebp - 0x14c]
push ecx
lea ecx, [ebp - 0x164]
push ecx
mov ecx, dword [ebp - 0x128]
sub esp, 0x10
movd xmm0, dword [ecx + 0x18]
cvtdq2ps xmm0, xmm0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mulss xmm0, xmm1
movss dword [esp + 4], xmm0
movd xmm0, dword [ecx + 0x14]
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm1
movss dword [esp], xmm0
push eax
push esi
call fcn.1004c240
mov eax, dword [ebp - 0x138]
add esp, 0x28
mov ecx, dword [ebp - 0x170]
sub ecx, dword [ebp - 0x164]
mov esi, dword [ebp - 0x144]
dec cx
movzx edx, ax
mov eax, dword [ebp - 0x128]
movss xmm1, dword [ebp - 0x160]
add cx, word [eax + 0x14]
mov eax, dword [edi - 4]
add cx, dx
mov word [esi + eax + 4], cx
mov ecx, dword [ebp - 0x168]
sub ecx, dword [ebp - 0x14c]
mov eax, dword [ebp - 0x128]
dec cx
add cx, word [eax + 0x18]
mov eax, dword [edi - 4]
add cx, dx
mov word [esi + eax + 6], cx
mov eax, dword [edi - 4]
movzx ecx, word [esi + eax + 6]
movzx eax, word [esi + eax + 4]
add esi, 0x10
imul ecx, eax
mov eax, dword [ebp - 0x11c]
mov dword [ebp - 0x144], esi
add eax, ecx
mov ecx, dword [ebp - 0x130]
inc ecx
mov dword [ebp - 0x11c], eax
mov dword [ebp - 0x130], ecx
cmp ecx, dword [edi + 0x20]
jl 0x10040db0
jmp 0x10040ec9
mov eax, dword [ebp - 0x11c]
mov ecx, dword [ebp - 0x124]
add dword [ebp - 0x134], 0x78
add edi, 0xc4
sub dword [ebp - 0x12c], 1
mov esi, dword [ebp - 0x120]
mov dword [ebp - 0x138], edi
jne 0x10040c70
movd xmm0, eax
xorps xmm1, xmm1
cvtdq2ps xmm0, xmm0
cvtps2pd xmm0, xmm0
ucomisd xmm1, xmm0
ja 0x10040f0e
sqrtsd xmm0, xmm0
jmp 0x10040f13
call fcn.100bf120
mov esi, dword [ebp - 0x13c]
cvtsd2ss xmm0, xmm0
mov eax, dword [esi + 0xc]
mov dword [esi + 0x20], 0
cvttss2si ecx, xmm0
inc ecx
test eax, eax
jg 0x10040f6b
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
comiss xmm0, dword [0x100f6ad8]
jb 0x10040f47
mov eax, 0x1000
jmp 0x10040f6b
comiss xmm0, dword [0x100f6ad4]
jb 0x10040f57
mov eax, 0x800
jmp 0x10040f6b
comiss xmm0, dword [0x100f6ad0]
mov eax, 0x200
mov ecx, 0x400
cmovae eax, ecx
push 0x2c
mov dword [esi + 0x1c], eax
lea eax, [ebp - 0x19c]
push 0
push eax
call fcn.10088c20
mov eax, dword [esi + 0x10]
mov dword [ebp - 0x12c], eax
mov eax, dword [esi + 0x1c]
push 0x30
mov dword [ebp - 0x120], eax
call fcn.1002d300
mov edi, eax
mov eax, dword [ebp - 0x120]
sub eax, dword [ebp - 0x12c]
mov dword [ebp - 0x11c], edi
mov dword [ebp - 0x14c], eax
lea ecx, [eax*8]
push ecx
call fcn.1002d300
add esp, 0x14
test edi, edi
je 0x10041030
test eax, eax
je 0x1004102d
mov ecx, dword [ebp - 0x120]
mov edx, dword [ebp - 0x12c]
mov dword [ebp - 0x194], ecx
mov dword [ebp - 0x18c], ecx
mov ecx, dword [ebp - 0x14c]
push ecx
push eax
mov dword [ebp - 0x174], eax
mov eax, 0x8000
sub eax, edx
mov dword [ebp - 0x198], edi
push eax
push ecx
push edi
mov dword [ebp - 0x188], edx
mov dword [ebp - 0x180], 1
mov dword [ebp - 0x17c], 1
mov dword [ebp - 0x184], 0
call fcn.1004bb50
add esp, 0x14
jmp 0x10041049
push edi
jmp 0x10041035
test eax, eax
je 0x1004103d
push eax
call fcn.1002d330
add esp, 4
mov eax, dword [ebp - 0x198]
mov dword [ebp - 0x11c], eax
xor eax, eax
mov dword [ebp - 0x1a4], 0
mov dword [ebp - 0x1a8], 0
mov dword [ebp - 0x1a0], eax
mov byte [ebp - 4], 4
mov edi, dword [esi + 0x40]
mov dword [ebp - 0x124], edi
test edi, edi
jle 0x100410ad
cmp edi, 8
mov ecx, edi
mov edx, 8
cmovl ecx, edx
mov dword [ebp - 0x14c], ecx
test ecx, ecx
jle 0x100410ad
mov eax, ecx
shl eax, 4
push eax
call fcn.1002d300
mov dword [ebp - 0x1a0], eax
add esp, 4
mov ecx, dword [ebp - 0x14c]
mov dword [ebp - 0x1a4], ecx
mov ecx, edi
mov dword [ebp - 0x1a8], edi
shl ecx, 4
push ecx
push 0
push eax
call fcn.10088c20
add esp, 0xc
cmp dword [esi + 0x40], 0
jle 0x10041101
mov edx, dword [ebp - 0x1a0]
xor ecx, ecx
add edx, 6
xor edi, edi
mov eax, dword [esi + 0x48]
lea ecx, [ecx + 0x1c]
inc edi
lea edx, [edx + 0x10]
movzx eax, word [ecx + eax - 0x18]
mov word [edx - 0x12], ax
mov eax, dword [esi + 0x48]
movzx eax, word [ecx + eax - 0x16]
mov word [edx - 0x10], ax
cmp edi, dword [esi + 0x40]
jl 0x100410d7
mov edi, dword [ebp - 0x124]
push edi
push dword [ebp - 0x1a0]
push dword [ebp - 0x11c]
call fcn.1004bcc0
add esp, 0xc
test edi, edi
jle 0x10041177
mov edx, dword [ebp - 0x1a0]
xor edi, edi
mov eax, dword [ebp - 0x124]
add edx, 0xa
nop dword [eax + eax]
cmp dword [edx + 2], 0
je 0x10041166
mov eax, dword [esi + 0x48]
movzx ecx, word [edx - 2]
mov word [edi + eax + 8], cx
mov eax, dword [esi + 0x48]
movzx ecx, word [edx]
mov word [edi + eax + 0xa], cx
movzx eax, word [edx]
movzx ecx, word [edx - 4]
add ecx, eax
mov eax, dword [ebp - 0x124]
cmp dword [esi + 0x20], ecx
cmovge ecx, dword [esi + 0x20]
mov dword [esi + 0x20], ecx
add edi, 0x1c
add edx, 0x10
sub eax, 1
mov dword [ebp - 0x124], eax
jne 0x10041130
mov byte [ebp - 4], 3
mov eax, dword [ebp - 0x1a0]
test eax, eax
je 0x1004118e
push eax
call fcn.1002d330
add esp, 4
mov edi, dword [ebp - 0x158]
test edi, edi
jle 0x10041229
mov edi, dword [ebp - 0x15c]
mov eax, dword [ebp - 0x158]
add edi, 0xa8
mov dword [ebp - 0x12c], eax
mov eax, dword [edi]
test eax, eax
je 0x10041214
push eax
push dword [edi - 0x14]
push dword [ebp - 0x11c]
call fcn.1004bcc0
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 0x120], ecx
cmp dword [edi], ecx
jle 0x10041214
xor edx, edx
nop word [eax + eax]
mov eax, dword [edi - 0x14]
cmp dword [eax + edx + 0xc], 0
je 0x10041206
movzx ecx, word [eax + edx + 0xa]
movzx eax, word [eax + edx + 6]
add ecx, eax
cmp dword [esi + 0x20], ecx
cmovge ecx, dword [esi + 0x20]
mov dword [esi + 0x20], ecx
mov ecx, dword [ebp - 0x120]
inc ecx
add edx, 0x10
mov dword [ebp - 0x120], ecx
cmp ecx, dword [edi]
jl 0x100411e0
add edi, 0xc4
sub dword [ebp - 0x12c], 1
jne 0x100411b4
mov edi, dword [ebp - 0x158]
test byte [esi + 4], 1
mov eax, dword [esi + 0x20]
jne 0x10041257
lea ecx, [eax - 1]
mov eax, ecx
sar eax, 1
or ecx, eax
mov eax, ecx
sar eax, 2
or ecx, eax
mov eax, ecx
sar eax, 4
or ecx, eax
mov eax, ecx
sar eax, 8
or ecx, eax
mov eax, ecx
sar eax, 0x10
or eax, ecx
movss xmm1, dword [0x100f0b58]
lea ecx, [eax + 1]
mov eax, dword [esi + 0x1c]
movaps xmm2, xmm1
mov dword [esi + 0x20], ecx
movd xmm0, eax
cvtdq2ps xmm0, xmm0
divss xmm2, xmm0
movd xmm0, ecx
cvtdq2ps xmm0, xmm0
imul ecx, eax
divss xmm1, xmm0
push ecx
movss dword [esi + 0x24], xmm2
movss dword [esi + 0x28], xmm1
call fcn.1002d300
mov ecx, dword [esi + 0x20]
imul ecx, dword [esi + 0x1c]
mov dword [esi + 0x14], eax
push ecx
push 0
push eax
call fcn.10088c20
mov eax, dword [esi + 0x14]
add esp, 0x10
mov dword [ebp - 0x178], eax
mov eax, dword [esi + 0x20]
mov dword [ebp - 0x190], eax
test edi, edi
jle 0x100414b6
mov ecx, dword [ebp - 0x15c]
xor eax, eax
mov dword [ebp - 0x120], eax
mov edx, edi
mov dword [ebp - 0x11c], ecx
mov dword [ebp - 0x12c], edi
mov edi, dword [esi + 0x54]
add edi, eax
cmp dword [ecx + 0xa8], 0
je 0x10041480
push dword [ecx + 0x94]
lea eax, [ecx + 0x7c]
push 1
push eax
push ecx
lea eax, [ebp - 0x19c]
push eax
call fcn.1004c790
movss xmm1, dword [edi + 0x44]
add esp, 0x14
ucomiss xmm1, dword [0x100f0b58]
movss dword [ebp - 0x14c], xmm1
lahf
test ah, 0x44
jnp 0x10041464
xor esi, esi
nop
movd xmm0, esi
mov eax, esi
cvtdq2pd xmm0, xmm0
shr eax, 0x1f
addsd xmm0, qword [eax*8 + 0x100ef6e0]
cvtpd2ps xmm0, xmm0
mulss xmm0, xmm1
call fcn.10085ff0
movss xmm1, dword [ebp - 0x14c]
mov edx, 0xff
cmp eax, edx
movzx ecx, al
cmovbe edx, ecx
mov byte [ebp + esi - 0x118], dl
inc esi
cmp esi, 0x100
jb 0x10041330
mov ecx, dword [ebp - 0x11c]
xor eax, eax
mov dword [ebp - 0x138], eax
mov edx, dword [ecx + 0x94]
cmp dword [ecx + 0xa8], eax
jle 0x10041666
lea ecx, [edx + 6]
mov edx, dword [ebp - 0x11c]
mov dword [ebp - 0x128], ecx
nop word [eax + eax]
cmp dword [ecx + 6], 0
je 0x10041442
mov eax, dword [ebp - 0x13c]
movzx edx, word [ecx + 4]
movzx edi, word [ecx]
movzx esi, word [ecx - 2]
mov eax, dword [eax + 0x1c]
mov dword [ebp - 0x134], eax
movzx eax, word [ecx + 2]
imul edx, dword [ebp - 0x134]
mov ecx, dword [ebp - 0x13c]
add edx, dword [ecx + 0x14]
mov ecx, dword [ebp - 0x128]
add edx, eax
test edi, edi
je 0x10041436
mov eax, dword [ebp - 0x134]
nop word [eax + eax]
xor ecx, ecx
test esi, esi
je 0x10041429
nop word [eax + eax]
movzx eax, byte [ecx + edx]
mov al, byte [ebp + eax - 0x118]
mov byte [ecx + edx], al
inc ecx
cmp ecx, esi
jl 0x10041410
mov eax, dword [ebp - 0x134]
dec edi
add edx, eax
test edi, edi
jg 0x10041400
mov ecx, dword [ebp - 0x128]
mov edx, dword [ebp - 0x11c]
mov eax, dword [ebp - 0x138]
inc eax
add ecx, 0x10
mov dword [ebp - 0x138], eax
mov dword [ebp - 0x128], ecx
cmp eax, dword [edx + 0xa8]
jl 0x100413b0
mov esi, dword [ebp - 0x13c]
mov ecx, dword [ebp - 0x11c]
mov eax, dword [ebp - 0x120]
mov edx, dword [ebp - 0x12c]
mov dword [ecx + 0x94], 0
add eax, 0x78
add ecx, 0xc4
sub edx, 1
mov dword [ebp - 0x120], eax
mov dword [ebp - 0x11c], ecx
mov dword [ebp - 0x12c], edx
jne 0x100412e0
mov eax, dword [ebp - 0x198]
mov edi, dword [ebp - 0x158]
mov dword [ebp - 0x11c], eax
push dword [ebp - 0x174]
call fcn.1002d330
push dword [ebp - 0x11c]
call fcn.1002d330
mov eax, dword [ebp - 0x154]
add esp, 8
test eax, eax
je 0x10041504
push eax
mov dword [ebp - 0x1bc], 0
mov dword [ebp - 0x1c0], 0
call fcn.1002d330
add esp, 4
xor eax, eax
mov dword [ebp - 0x154], eax
mov dword [ebp - 0x1b8], eax
test edi, edi
jle 0x10041a41
mov edx, dword [ebp - 0x15c]
xor ecx, ecx
movss xmm4, dword [0x100f0b30]
add edx, 4
mov eax, edi
mov dword [ebp - 0x144], ecx
mov dword [ebp - 0x11c], edx
mov dword [ebp - 0x130], eax
cmp dword [edx + 0xa4], 0
je 0x100419b9
mov eax, dword [esi + 0x54]
xorps xmm6, xmm6
mov edi, dword [edx + 0x18]
add eax, ecx
mov esi, dword [edx]
mov dword [ebp - 0x124], eax
mov eax, dword [eax + 0x74]
movzx ecx, byte [edi + esi + 6]
movzx edx, byte [edi + esi + 7]
mov dword [ebp - 0x134], eax
mov eax, 0x100
cwde
movsx ecx, cx
imul ecx, eax
mov eax, 0x100
cwde
add dx, cx
movzx ecx, byte [edi + esi + 4]
movsx ecx, cx
imul ecx, eax
movzx eax, byte [edi + esi + 5]
movsx edx, dx
mov edi, dword [ebp - 0x134]
add cx, ax
movsx ecx, cx
mov eax, ecx
sub eax, edx
movd xmm1, ecx
cvtdq2ps xmm1, xmm1
mov ecx, dword [ebp - 0x124]
movd xmm0, eax
mov eax, dword [ebp - 0x124]
cvtdq2ps xmm0, xmm0
movss xmm2, dword [eax + 0x10]
xor eax, eax
divss xmm2, xmm0
comiss xmm1, xmm6
mulss xmm1, xmm2
seta al
lea eax, [eax*2 - 1]
movd xmm0, eax
cvtdq2ps xmm0, xmm0
addss xmm0, xmm1
movd xmm1, edx
cvtdq2ps xmm1, xmm1
cvttss2si eax, xmm0
movd xmm0, eax
xor eax, eax
comiss xmm1, xmm6
cvtdq2ps xmm0, xmm0
seta al
cmp byte [ecx + 0x3c], 0
mulss xmm1, xmm2
lea eax, [eax*2 - 1]
movss dword [ebp - 0x14c], xmm0
movd xmm0, eax
cvtdq2ps xmm0, xmm0
addss xmm0, xmm1
cvttss2si esi, xmm0
jne 0x10041671
mov ecx, edi
call fcn.1003f200
mov ecx, dword [ebp - 0x124]
xorps xmm6, xmm6
movss xmm0, dword [ebp - 0x14c]
movss xmm4, dword [0x100f0b30]
movd xmm1, esi
mov eax, dword [ecx + 0x10]
cvtdq2ps xmm1, xmm1
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x13c]
mov dword [edi + 0x3c], ecx
mov dword [edi + 0x38], eax
movss dword [edi + 0x4c], xmm0
movss dword [edi + 0x50], xmm1
jmp 0x10041676
mov esi, dword [ebp - 0x13c]
jmp 0x1004146a
movss xmm0, dword [edi + 0x4c]
inc word [edi + 0x40]
addss xmm0, xmm4
mov edx, dword [ebp - 0x11c]
movss xmm2, dword [ecx + 0x28]
movss dword [ebp - 0x1d4], xmm2
mov dword [ebp - 0x138], 0
cmp dword [edx + 0xa4], 0
cvttss2si eax, xmm0
movd xmm5, eax
cvtdq2ps xmm5, xmm5
addss xmm5, dword [ecx + 0x2c]
movss dword [ebp - 0x16c], xmm5
jle 0x100419a7
xor esi, esi
mov dword [ebp - 0x128], esi
mov esi, dword [ebp - 0x13c]
nop
mov eax, dword [edx + 0xbc]
mov edi, dword [ebp - 0x138]
movss xmm0, dword [ecx + 0x34]
movss dword [ebp - 0x120], xmm0
mov eax, dword [eax + edi*4]
mov dword [ebp - 0x168], eax
mov eax, dword [edx + 0x94]
mov edx, dword [ebp - 0x128]
mov dword [ebp - 0x14c], eax
movss xmm1, dword [eax + edx + 0x10]
comiss xmm0, xmm1
ja 0x10041720
movss xmm0, dword [ecx + 0x38]
minss xmm0, xmm1
movss dword [ebp - 0x120], xmm0
mov edi, dword [ebp - 0x134]
movaps xmm3, xmm2
ucomiss xmm1, xmm0
lahf
test ah, 0x44
jnp 0x10041752
cmp byte [ecx + 0x1c], 0
movaps xmm3, xmm0
subss xmm3, xmm1
mulss xmm3, xmm4
je 0x1004174e
cvttss2si eax, xmm3
movd xmm3, eax
cvtdq2ps xmm3, xmm3
addss xmm3, xmm2
movd xmm0, dword [esi + 0x1c]
movss xmm2, dword [0x100f0b58]
cvtdq2ps xmm0, xmm0
mov ecx, dword [ebp - 0x14c]
movzx eax, word [ecx + edx]
movaps xmm1, xmm2
divss xmm1, xmm0
movd xmm0, dword [esi + 0x20]
cvtdq2ps xmm0, xmm0
divss xmm2, xmm0
movd xmm0, eax
movzx eax, word [ecx + edx + 2]
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm1
movss dword [ebp - 0x160], xmm0
movd xmm0, eax
movzx eax, word [ecx + edx + 4]
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm2
movss dword [ebp - 0x1c4], xmm0
movd xmm0, eax
movzx eax, word [ecx + edx + 6]
cvtdq2ps xmm0, xmm0
mulss xmm0, xmm1
movss dword [ebp - 0x1c8], xmm0
movd xmm0, eax
cvtdq2ps xmm0, xmm0
mov eax, dword [edi + 0x20]
inc eax
push eax
mulss xmm0, xmm2
movss dword [ebp - 0x1cc], xmm0
movss xmm0, dword [ecx + edx + 8]
addss xmm0, xmm6
addss xmm0, xmm3
movss dword [ebp - 0x14c], xmm0
movss xmm0, dword [ecx + edx + 0xc]
addss xmm0, xmm6
addss xmm0, xmm5
movss dword [ebp - 0x164], xmm0
movss xmm0, dword [ecx + edx + 0x14]
addss xmm0, xmm6
addss xmm0, xmm3
movss dword [ebp - 0x170], xmm0
movss xmm0, dword [ecx + edx + 0x18]
lea ecx, [edi + 0x20]
addss xmm0, xmm6
addss xmm0, xmm5
movss dword [ebp - 0x12c], xmm0
call fcn.10045b40
mov eax, dword [edi + 0x20]
mov ecx, dword [edi + 0x28]
movss xmm0, dword [ebp - 0x14c]
movss xmm4, dword [0x100f0b30]
lea edx, [eax + eax*4]
mov dword [ebp - 0x1d0], ecx
mov eax, dword [ebp - 0x168]
movss dword [ecx + edx*8 - 0x20], xmm0
movss xmm0, dword [ebp - 0x164]
movss dword [ecx + edx*8 - 0x1c], xmm0
movss xmm0, dword [ebp - 0x170]
movss dword [ecx + edx*8 - 0x18], xmm0
movss xmm0, dword [ebp - 0x12c]
movss dword [ecx + edx*8 - 0x14], xmm0
movss xmm0, dword [ebp - 0x160]
movss dword [ecx + edx*8 - 0x10], xmm0
movss xmm0, dword [ebp - 0x1c4]
movss dword [ecx + edx*8 - 0xc], xmm0
movss xmm0, dword [ebp - 0x1c8]
movss dword [ecx + edx*8 - 8], xmm0
movss xmm0, dword [ebp - 0x1cc]
movss dword [ecx + edx*8 - 4], xmm0
mov word [ecx + edx*8 - 0x28], ax
mov eax, dword [edi + 0x3c]
movss xmm0, dword [eax + 0x20]
addss xmm0, dword [ebp - 0x120]
movss dword [ecx + edx*8 - 0x24], xmm0
mov eax, dword [edi + 0x3c]
cmp byte [eax + 0x1c], 0
je 0x10041905
addss xmm0, xmm4
cvttss2si eax, xmm0
movd xmm0, eax
cvtdq2ps xmm0, xmm0
movss dword [ecx + edx*8 - 0x24], xmm0
mov eax, dword [edi + 0x38]
xorps xmm6, xmm6
mov esi, dword [ebp - 0x1d0]
mov byte [edi + 0x58], 1
movss xmm0, dword [ecx + edx*8 - 8]
movd xmm1, dword [eax + 0x1c]
subss xmm0, dword [ecx + edx*8 - 0x10]
cvtdq2ps xmm1, xmm1
add dword [ebp - 0x128], 0x1c
movss xmm2, dword [ebp - 0x1d4]
mulss xmm1, xmm0
movd xmm0, dword [eax + 0x20]
cvtdq2ps xmm0, xmm0
addss xmm1, dword [0x100f6abc]
movss xmm5, dword [ebp - 0x16c]
cvttss2si ecx, xmm1
movss xmm1, dword [esi + edx*8 - 4]
subss xmm1, dword [esi + edx*8 - 0xc]
mov edx, dword [ebp - 0x11c]
mov esi, dword [ebp - 0x13c]
mulss xmm1, xmm0
addss xmm1, dword [0x100f6abc]
cvttss2si eax, xmm1
imul ecx, eax
mov eax, dword [ebp - 0x138]
inc eax
mov dword [ebp - 0x138], eax
add dword [edi + 0x54], ecx
mov ecx, dword [ebp - 0x124]
cmp eax, dword [edx + 0xa4]
jl 0x100416d0
jmp 0x100419ad
mov esi, dword [ebp - 0x13c]
mov eax, dword [ebp - 0x130]
mov ecx, dword [ebp - 0x144]
add edx, 0xc4
add ecx, 0x78
sub eax, 1
mov dword [ebp - 0x11c], edx
mov dword [ebp - 0x144], ecx
mov dword [ebp - 0x130], eax
jne 0x10041533
mov edi, dword [ebp - 0x15c]
mov esi, dword [ebp - 0x158]
add edi, 0xb4
nop
lea eax, [edi - 0xb4]
mov dword [ebp - 0x16c], eax
mov byte [ebp - 4], 5
mov eax, dword [edi + 0xc]
test eax, eax
je 0x10041a10
push eax
call fcn.1002d330
add esp, 4
mov byte [ebp - 4], 3
lea eax, [edi - 8]
mov dword [ebp - 0x16c], eax
mov byte [ebp - 4], 3
mov eax, dword [edi]
test eax, eax
je 0x10041a30
push eax
call fcn.1002d330
add esp, 4
add edi, 0xc4
sub esi, 1
jne 0x100419f0
mov esi, dword [ebp - 0x13c]
push esi
call fcn.1003fd00
add esp, 4
mov byte [ebp - 0x13d], 1
mov byte [ebp - 4], 2
mov eax, dword [ebp - 0x148]
test eax, eax
je 0x10041a68
push eax
call fcn.1002d330
add esp, 4
mov byte [ebp - 4], 1
mov eax, dword [ebp - 0x154]
test eax, eax
je 0x10041a7f
push eax
call fcn.1002d330
add esp, 4
mov edi, dword [ebp - 0x150]
mov byte [ebp - 4], 0
test edi, edi
je 0x10041a96
push edi
call fcn.1002d330
add esp, 4
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0x15c]
test eax, eax
je 0x10041ab0
push eax
call fcn.1002d330
add esp, 4
mov al, byte [ebp - 0x13d]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.10085c29
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret