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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xd0
mov eax, dword [ebp + 0x18]
mov dword [esp + 0x24], ecx
mov ecx, dword [ebp + 0x1c]
mov dword [esp + 0x10], edx
xor ebx, ebx
mov esi, 1
mov byte [esp + 0x78], 2
movdqu xmm0, xmmword [esp + 0x68]
mov edx, eax
or edx, ecx
mov edx, dword [ebp + 0x14]
cmovne esi, dword [ebp + 0x10]
cmove edx, ebx
sub eax, 1
sbb ecx, 0
mov dword [esp + 0x38], esi
mov dword [esp + 0x3c], edx
cmovb eax, ebx
cmovb ecx, ebx
cmp eax, esi
mov dword [esp + 0x44], ecx
mov dword [esp + 0x40], eax
lea eax, [esp + 0x68]
mov byte [esp + 0x48], 0
sbb ecx, edx
lea ecx, [esp + 0x38]
movdqu xmm1, xmmword [esp + 0x38]
cmovb ecx, eax
mov edx, dword [ecx + 0x11]
mov ecx, dword [ecx + 0x14]
mov dword [esp + 0x30], edx
mov dword [esp + 0x33], ecx
setb cl
jb 0x10039c50
mov dl, 1
test dl, dl
je 0x10039c50
movzx ecx, cl
mov edx, dword [esp + 0x33]
movd xmm2, ecx
mov ecx, dword [esp + 0x30]
pshufd xmm2, xmm2, 0x44
psllq xmm2, 0x3f
psrad xmm2, 0x1f
mov dword [esp + 0x6b], edx
pshufd xmm2, xmm2, 0xf5
mov dword [esp + 0x68], ecx
pand xmm0, xmm2
pandn xmm2, xmm1
por xmm2, xmm0
movd edi, xmm2
test edi, 0xfff
jne 0x10039c61
movdqa xmm0, xmm2
pshufd xmm0, xmm2, 0xee
movdqa xmmword [esp + 0x50], xmm2
movd esi, xmm0
mov ecx, esi
not ecx
test ecx, 0xfff
jne 0x10039c72
mov edx, dword [esp + 0x6b]
mov ecx, dword [esp + 0x68]
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0x2b], edx
mov dword [esp + 0x28], ecx
mov ecx, dword [ebx + 8]
cmp dword [ecx + 0x1940], 0
jne 0x10039c83
mov edx, dword [esp + 0x10]
mov dword [ecx + 0x1940], 0xffffffff
movdqa xmm0, xmmword [esp + 0x50]
shr edx, 4
and edx, 0xfc
mov ebx, dword [ecx + edx + 0x1944]
test ebx, ebx
je 0x10039c99
inc dword [ebx]
inc dword [ecx + 0x1940]
mov dword [esp + 0x38], ebx
mov dword [esp + 4], esi
cmp dword [ebx + 8], 0
jne 0x10039cb2
pshufd xmm0, xmm0, 0x55
lea esi, [ebx + 0xc]
mov dword [ebx + 8], 0xffffffff
and edi, 0xfffff000
lea ecx, [esp + 0x68]
movd eax, xmm0
mov edx, esi
push eax
push edi
call fcn.10039ce0
add esp, 8
mov eax, dword [esp + 0x68]
test eax, eax
je 0x1003982f
mov edi, dword [esp + 0x24]
mov ecx, dword [esp + 0x6c]
mov edx, dword [esp + 0x70]
mov esi, dword [esp + 0x74]
mov dword [edi], eax
mov dword [edi + 4], ecx
mov dword [edi + 8], edx
mov dword [edi + 0xc], esi
inc dword [ebx + 8]
lea ecx, [esp + 0x38]
call fcn.1002f060
push dword [ebp + 0x20]
call fcn.100390f0
add esp, 4
jmp 0x10039c17
mov dword [esp + 8], esi
pshufd xmm0, xmmword [esp + 0x50], 0xff
mov esi, dword [esp + 4]
mov ecx, dword [esp + 0x6c]
movd eax, xmm0
mov edx, esi
mov dword [esp + 0xc], ecx
and edx, eax
cmp edx, 0xffffffff
je 0x10039892
mov edi, dword [esp + 8]
add esi, 1
lea ecx, [esp + 0x68]
adc eax, 0
and esi, 0xfffff000
mov edx, edi
push eax
push esi
call fcn.10039ce0
add esp, 8
mov eax, dword [esp + 0x68]
test eax, eax
jne 0x100397f8
mov edx, dword [esp + 0x6c]
cmp dword [esp + 0xc], edx
mov dword [esp + 0x1c], ebx
jb 0x100398a7
jmp 0x10039a87
mov edx, dword [ebx + 0x10]
mov edi, dword [esp + 8]
cmp dword [esp + 0xc], edx
mov dword [esp + 0x1c], ebx
jae 0x10039a87
and dword [esp + 0x10], 0xffffffc0
mov esi, dword [esp + 0xc]
mov dword [esp + 0x14], edx
jmp 0x100398d0
mov edx, dword [esp + 0x14]
mov esi, dword [esp + 0x18]
cmp esi, edx
je 0x10039a87
lea eax, [esi + 1]
mov dword [esp + 0x20], esi
mov dword [esp + 0x18], eax
jmp 0x100398fb
mov edi, ebx
mov ebx, dword [esp]
mov edx, ecx
mov ecx, ebx
call fcn.10068cd0
mov ecx, ebx
mov ebx, edi
mov edi, dword [esp + 8]
call fcn.1002e4e0
mov eax, dword [ebx + 0x10]
mov edx, dword [ebx + 0x14]
cmp eax, edx
cmovb edx, eax
cmp esi, edx
jae 0x10039c1f
mov eax, dword [edi]
lea edx, [esi + esi*2]
shl edx, 5
mov ecx, dword [eax + edx + 0x54]
mov esi, dword [eax + edx + 0x58]
cmp ecx, esi
cmovb esi, ecx
test esi, esi
je 0x100398c0
lea esi, [eax + edx + 0x54]
mov eax, dword [eax + edx + 0x50]
dec ecx
mov dword [esi], ecx
lea ecx, [ecx + ecx*2]
mov edx, dword [eax + ecx*8 + 8]
cmp edx, 3
je 0x100398c0
mov dword [esp + 4], edx
lea edx, [eax + ecx*8]
mov esi, dword [edx]
mov dword [esp], edx
mov edx, 0xfffff000
and esi, edx
or esi, dword [esp + 0x10]
mov ebx, esi
shr ebx, 0xc
movzx edi, bl
lea edx, [edi + edi*2]
mov edi, dword [ebp + 0xc]
mov ebx, dword [edi]
mov edi, dword [ebx + edx*8 + 0x10]
and edi, 0xffffffc0
xor edi, esi
mov esi, dword [esp]
mov esi, dword [esi + 4]
or esi, dword [ebp + 8]
xor esi, dword [ebx + edx*8 + 0x14]
or edi, esi
mov edi, dword [eax + ecx*8 + 0xc]
mov ecx, dword [eax + ecx*8 + 0x10]
mov dword [esp], edi
jne 0x10039a2e
lea esi, [ebx + edx*8 + 0x10]
mov dword [esi + 4], 0
mov dword [esi], 0
mov eax, dword [ebx + edx*8]
cmp eax, 2
jb 0x100399b7
mov eax, dword [esi - 4]
mov dword [eax + 0x1020], 0xffffffff
mov eax, dword [esi - 0x10]
test eax, eax
je 0x10039a20
cmp eax, 1
je 0x100399d3
cmp eax, 2
jne 0x100399f1
mov eax, dword [esi - 8]
dec dword [eax]
mov eax, dword [esi - 4]
dec dword [eax]
jne 0x10039a20
jmp 0x100399fd
mov eax, dword [esi - 0xc]
dec dword [eax]
jne 0x10039a20
cmp dword [eax + 4], 0
jne 0x10039a20
mov edi, ecx
mov ecx, dword [0x421b000]
push 0x10
push 0x1010
jmp 0x10039a12
mov eax, dword [esi - 8]
inc dword [eax]
mov eax, dword [esi - 4]
dec dword [eax]
jne 0x10039a20
cmp dword [eax + 4], 0
jne 0x10039a20
mov edi, ecx
mov ecx, dword [0x421b000]
push 0x10
push 0x1030
push eax
push 0x421a968
call dword [ecx + 0x10]
mov ecx, edi
add esp, 0x10
mov dword [esi - 0x10], 0
mov dword [esi - 0xc], 0x4219530
mov eax, dword [esp + 4]
mov ebx, dword [esp + 0x1c]
mov edi, dword [esp + 8]
mov esi, dword [esp + 0x20]
test eax, eax
je 0x100398fb
cmp eax, 1
jne 0x100398e0
mov eax, dword [esp]
dec dword [eax]
jne 0x100398fb
mov eax, dword [esp]
cmp dword [eax + 4], 0
jne 0x100398fb
mov eax, dword [0x421b000]
push 0x10
push 0x1010
push dword [esp + 8]
push 0x421a968
call dword [eax + 0x10]
add esp, 0x10
jmp 0x100398fb
mov esi, dword [ebx + 0x10]
mov ecx, dword [ebx + 0x14]
mov eax, dword [esp + 0xc]
cmp esi, ecx
lea eax, [eax + 1]
cmovb ecx, esi
mov dword [esp + 4], eax
cmp edx, ecx
mov dword [esp], ecx
cmovae edx, ecx
mov ecx, edx
sub ecx, dword [esp + 4]
jbe 0x10039b3c
mov eax, dword [esp + 4]
mov dword [esp + 0x14], edx
mov edx, dword [edi]
mov dword [esp + 0x20], esi
mov dword [esp + 8], ecx
lea ebx, [eax + eax*2]
mov dword [esp + 0x18], edx
shl ebx, 5
add ebx, edx
mov dword [esp + 0x10], ebx
nop word cs:[eax + eax]
nop dword [eax]
lea eax, [esp + 0x68]
mov dword [esp + 4], ecx
mov ecx, 0x18
mov esi, ebx
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
call fcn.1002b1d0
mov ecx, dword [esp + 4]
add ebx, 0x60
dec ecx
jne 0x10039ae0
mov ecx, dword [esp + 0x14]
mov edx, dword [esp + 0x18]
lea eax, [ecx + ecx*2]
shl eax, 5
add edx, eax
mov eax, dword [esp]
sub eax, ecx
shl eax, 5
lea eax, [eax + eax*2]
push eax
push edx
push dword [esp + 0x18]
call 0x10070c30
add esp, 0xc
mov esi, dword [esp + 0x20]
mov ebx, dword [esp + 0x1c]
sub esi, dword [esp + 8]
mov dword [ebx + 0x10], esi
mov ecx, dword [esp + 0xc]
cmp ecx, esi
jae 0x10039c30
mov edx, dword [ebx + 0x14]
cmp esi, edx
cmovb edx, esi
cmp ecx, edx
jae 0x10039c41
mov esi, dword [ebx + 0xc]
lea edi, [ecx + ecx*2]
shl edi, 5
lea ecx, [esi + edi + 0x50]
lea ebx, [esi + edi]
call fcn.1002b2c0
push ebx
call fcn.100390f0
add esp, 4
mov eax, dword [ebp + 0x20]
mov edx, dword [esp + 0x24]
movsd xmm0, qword [eax + 0x30]
movsd qword [esi + edi + 0x30], xmm0
movsd xmm0, qword [eax + 0x28]
movsd qword [esi + edi + 0x28], xmm0
movsd xmm0, qword [eax + 0x20]
movsd qword [esi + edi + 0x20], xmm0
movsd xmm0, qword [eax + 0x18]
movsd qword [esi + edi + 0x18], xmm0
movsd xmm0, qword [eax + 0x10]
movsd qword [esi + edi + 0x10], xmm0
movsd xmm1, qword [eax + 8]
movq xmm0, qword [eax]
movsd qword [esi + edi + 8], xmm1
movdqa xmm1, xmmword [esp + 0x50]
movq qword [esi + edi], xmm0
movdqu xmmword [esi + edi + 0x38], xmm1
mov byte [esi + edi + 0x48], 0
mov eax, dword [esp + 0x28]
mov ecx, dword [esp + 0x2b]
mov dword [esi + edi + 0x49], eax
mov dword [esi + edi + 0x4c], ecx
mov ecx, dword [esp + 0x1c]
mov dword [esi + edi + 0x50], 8
mov dword [esi + edi + 0x54], 0
mov dword [esi + edi + 0x58], 0
mov dword [edx], 0
inc dword [ecx + 8]
lea ecx, [esp + 0x38]
call fcn.1002f060
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, esi
push 0x42176b0
call fcn.10006410
add esp, 4
ud2
mov edx, esi
push 0x4217690
call fcn.10006410
add esp, 4
ud2
push 0x42176a0
call fcn.10006410
add esp, 4
ud2
mov ecx, 0x421ab8c
mov edx, 0x2b
push 0x4218298
jmp 0x10039ca8
mov ecx, 0x421a9e4
mov edx, 0x36
push 0x421aa24
jmp 0x10039ca8
mov ecx, 0x4211831
mov edx, 0x45
push 0x4211878
jmp 0x10039ca8
mov ecx, 0x421aa9c
mov edx, 0x10
push 0x4217228
push 0x42173a0
jmp 0x10039cc6
mov ecx, 0x421ab8c
mov edx, 0x2b
push 0x4217238
call fcn.10006dd0
add esp, 4
ud2
mov ecx, 0x421aa9c
mov edx, 0x10
push 0x4217504
push 0x42176d0
push eax
call fcn.10007620
add esp, 0xc
ud2