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

Disassembly:
push ebp
mov ebp, esp
push ebx
push edi
push esi
and esp, 0xfffffff0
sub esp, 0xc0
mov edi, dword [ebp + 0xc]
mov eax, edi
sub eax, dword [edx + 8]
jb 0x10046aea
mov esi, dword [edx + 0xc]
mov ebx, edx
cmp eax, esi
jae 0x10046aea
mov edx, dword [ebp + 0x14]
lea edx, [edx*8]
cmp esi, edx
mov edx, dword [ebp + 0x14]
jbe 0x10046aea
lea eax, [eax + edx*8]
cmp eax, esi
ja 0x10046aea
test edx, edx
mov dword [esp + 0x30], ecx
je 0x10046af4
lea eax, [ebx + 0x10]
lea ecx, [ebx + 0x1c]
mov dword [esp + 8], ebx
mov dword [esp + 0x7c], eax
mov dword [esp + 0x6c], ecx
mov ecx, dword [ebx + 8]
mov eax, edi
sub eax, ecx
mov dword [esp + 0x50], ecx
jb 0x10046b76
mov esi, dword [ebx + 0xc]
cmp eax, esi
jae 0x10046b76
cmp esi, 9
jb 0x10046b76
add eax, 8
cmp eax, esi
ja 0x10046b76
mov dword [esp + 0x10], edx
mov edx, dword [ebp + 8]
mov dword [esp + 0x74], 0
mov dword [esp + 0x70], 0
lea ecx, [esp + 0x14]
push 8
lea eax, [esp + 0x74]
push eax
push edi
call fcn.10041700
add esp, 0xc
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x10046b02
cmp dword [esp + 0x1c], 8
jne 0x10046b13
mov edx, dword [esp + 0x74]
mov dword [esp + 0xc], edi
mov edi, edx
and edi, 0x7fffffff
cmp esi, edi
jbe 0x10046b76
mov ebx, dword [esp + 0x70]
cmp byte [ebp + 0x10], 0
mov dword [esp + 0x34], edi
je 0x100466d0
and ebx, 0x7fffffff
cmp esi, ebx
jbe 0x10046b76
add ebx, dword [esp + 0x50]
mov dword [esp + 0x84], edx
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x14]
mov word [esp + 0x4e], 0
push 2
lea eax, [esp + 0x52]
push eax
push ebx
call fcn.100418b0
add esp, 0xc
mov ecx, dword [esp + 0x14]
mov eax, dword [esp + 0x18]
test ecx, ecx
jne 0x10046b33
cmp dword [esp + 0x1c], 2
jne 0x100466e0
movdqa xmm0, xmmword [0x3c9d550]
pinsrw xmm0, word [eax], 1
jmp 0x100466f1
mov dword [esp + 0x50], 1
jmp 0x100467f1
movdqa xmm0, xmmword [esp + 0xa0]
pand xmm0, xmmword [0x3c9d540]
movd eax, xmm0
test ax, ax
je 0x10046b6e
add ebx, 2
movdqa xmmword [esp + 0xa0], xmm0
mov eax, ebx
sub eax, dword [esp + 0x50]
jb 0x10046b76
cmp eax, esi
jae 0x10046b76
movdqa xmm0, xmmword [esp + 0xa0]
pextrw ecx, xmm0, 1
lea edx, [ecx + ecx]
cmp esi, edx
jbe 0x10046b76
lea eax, [eax + ecx*2]
cmp eax, esi
ja 0x10046b76
mov edi, dword [esp + 8]
mov ecx, dword [esp + 0x7c]
mov dword [esp + 0x80], edx
mov esi, dword [edi + 4]
cmp edx, esi
cmovb esi, edx
mov edx, esi
call fcn.10027480
cmp al, 8
jne 0x10046b81
mov ecx, dword [edi + 0x14]
mov eax, dword [edi + 0x10]
mov edi, dword [edi + 0x18]
mov edx, dword [ebp + 8]
cmp ecx, edi
mov dword [esp + 0x78], ecx
cmovb edi, ecx
lea ecx, [esp + 0x14]
push edi
mov dword [esp + 0x54], eax
push eax
push ebx
call fcn.100418b0
add esp, 0xc
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x10046b19
cmp dword [esp + 0x1c], esi
jne 0x100467a8
mov edi, dword [esp + 0x18]
jmp 0x100467ce
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x14]
push edi
mov edi, dword [esp + 0x54]
push edi
push ebx
call fcn.10041700
add esp, 0xc
mov eax, dword [esp + 0x14]
test eax, eax
jne 0x10046b19
mov esi, dword [esp + 0x78]
mov ecx, edi
mov edx, esi
call 0x1006d230
mov edx, dword [esp + 0x84]
mov esi, dword [esp + 0x80]
mov ecx, ebx
mov ebx, eax
mov dword [esp + 0x50], 0
mov edi, dword [ebp + 0x18]
mov dword [esp + 0x8c], esi
mov dword [esp + 0x88], ecx
not edx
movsd xmm0, qword [esp + 0x88]
shr edx, 0x1f
mov dword [esp + 0x9c], edx
mov dword [esp + 0x40], edx
mov esi, dword [edi + 4]
movsd qword [esp + 0x94], xmm0
movsd qword [esp + 0x38], xmm0
inc esi
je 0x10046c1a
cmp esi, dword [edi + 8]
jbe 0x10046862
mov ecx, esi
call fcn.100032d0
cmp eax, esi
jbe 0x10046851
mov ecx, edi
mov edx, eax
call fcn.10028590
cmp al, 8
je 0x10046862
mov ecx, edi
mov edx, esi
call fcn.10028590
cmp al, 8
jne 0x10046c1a
mov edx, edi
mov edi, dword [edi]
mov ecx, dword [esp + 0x50]
mov esi, dword [edx + 4]
lea eax, [esi + esi*2]
inc esi
mov dword [edi + eax*8], ecx
mov dword [edi + eax*8 + 4], ebx
mov ebx, dword [esp + 0x34]
movsd xmm0, qword [esp + 0x38]
movsd qword [edi + eax*8 + 8], xmm0
mov ecx, dword [esp + 0x40]
mov dword [edi + eax*8 + 0x10], ecx
mov dword [edi + eax*8 + 0x14], ebx
mov ebx, dword [esp + 8]
mov dword [edx + 4], esi
je 0x10046b76
cmp dword [edi + eax*8 + 0x10], 0
je 0x100469a0
mov ecx, dword [edi + eax*8 + 0x14]
mov edx, dword [ebx + 0xc]
cmp edx, ecx
jbe 0x10046b76
cmp edx, 0x11
jb 0x100469eb
mov ebx, dword [ebx + 8]
lea eax, [ebx + ecx]
cmp eax, ebx
jb 0x100469e7
add ecx, 0x10
cmp ecx, edx
ja 0x100469e7
mov ebx, dword [esp + 8]
mov edx, dword [esp + 0x10]
cmp esi, 3
jne 0x10046a17
mov ecx, ebx
mov ebx, dword [ebx + 0x20]
cmp dword [ecx], ebx
jbe 0x10046a1d
mov edx, dword [ebp + 8]
lea ecx, [esp + 0x14]
mov dword [esp + 0x50], ebx
mov dword [esp + 0x3c], 0
mov dword [esp + 0x38], 0
mov dword [esp + 0x40], 0
push 0xc
lea ebx, [esp + 0x3c]
push ebx
push eax
call fcn.10041700
add esp, 0xc
mov ecx, dword [esp + 0x14]
test ecx, ecx
jne 0x10046be6
cmp dword [esp + 0x1c], 0xc
mov edx, dword [esp + 0x10]
jne 0x10046a27
movsd xmm0, qword [edi + 0x18]
movsd xmm1, qword [edi + 0x20]
lea eax, [esp + 0x20]
movsd xmm2, qword [esp + 0x38]
mov ebx, dword [esp + 0x40]
movsd qword [eax + 8], xmm1
movsd qword [eax], xmm0
mov eax, dword [edi + 0xc]
mov ecx, dword [edi]
mov dword [esp + 0x1c], eax
mov al, 7
movsd xmm0, qword [edi + 4]
mov edi, dword [esp + 0x50]
inc edi
movsd qword [esp + 0x14], xmm0
jne 0x10046a35
cmp ecx, 2
mov ebx, dword [esp + 8]
mov ecx, dword [esp + 0xc]
je 0x100469f3
jmp 0x10046bfc
cmp esi, 3
jae 0x10046b76
mov eax, dword [edi + eax*8 + 0x14]
cmp dword [ebx + 0xc], eax
jbe 0x10046b76
mov edi, dword [ebp + 0x18]
add eax, dword [ebx + 8]
lea ecx, [esp + 0x14]
mov edx, ebx
push edi
push eax
push dword [ebp + 8]
call fcn.10046430
add esp, 0xc
cmp dword [esp + 0x14], 0
mov ecx, dword [esp + 0xc]
jne 0x10046bd4
mov esi, dword [edi + 4]
mov edx, dword [esp + 0x10]
jmp 0x100469f6
mov ebx, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov edx, dword [esp + 0x10]
mov edi, dword [ebp + 0x18]
mov eax, dword [edi + 8]
cmp esi, eax
cmovb eax, esi
test eax, eax
je 0x10046a06
dec esi
mov dword [edi + 4], esi
mov edi, ecx
add edi, 8
dec edx
jne 0x100465d8
jmp 0x10046af4
mov ecx, dword [esp + 0xc]
jmp 0x100469f3
mov ebx, dword [esp + 8]
mov ecx, dword [esp + 0xc]
jmp 0x100469f3
mov ebx, dword [esp + 8]
mov ecx, dword [esp + 0xc]
mov byte [ebx + 0x29], 1
jmp 0x100469f3
mov eax, dword [esp + 8]
cmp edi, dword [eax + 0x24]
jbe 0x10046a8a
mov dword [esp + 0x34], ecx
mov ecx, edi
movaps xmmword [esp + 0x50], xmm2
call fcn.100032d0
cmp eax, edi
jbe 0x10046a6a
mov ecx, dword [esp + 0x6c]
mov edx, eax
call fcn.10027a70
mov ecx, dword [esp + 0x34]
movaps xmm2, xmmword [esp + 0x50]
cmp al, 8
je 0x10046a8a
mov ecx, dword [esp + 0x6c]
mov edx, edi
call fcn.10027a70
mov ecx, dword [esp + 0x34]
movaps xmm2, xmmword [esp + 0x50]
mov edx, dword [esp + 0x10]
cmp al, 8
jne 0x1004698b
mov dword [esp + 0x50], ebx
mov ebx, dword [esp + 8]
mov edi, ecx
mov eax, dword [ebx + 0x20]
mov ecx, dword [ebx + 0x1c]
imul edx, eax, 0x2c
inc eax
mov dword [ecx + edx], edi
movsd xmm0, qword [esp + 0x14]
movsd xmm1, qword [esp + 0x1c]
movsd qword [ecx + edx + 4], xmm0
movsd qword [ecx + edx + 0xc], xmm1
movsd xmm0, qword [esp + 0x24]
movsd qword [ecx + edx + 0x14], xmm0
mov edi, dword [esp + 0x2c]
mov dword [ecx + edx + 0x1c], edi
mov edi, dword [esp + 0x50]
movlps qword [ecx + edx + 0x20], xmm2
mov dword [ecx + edx + 0x28], edi
mov edx, dword [esp + 0x10]
mov ecx, dword [esp + 0xc]
mov dword [ebx + 0x20], eax
jmp 0x100469f3
mov word [ecx], 0
jmp 0x10046bcc
mov eax, dword [esp + 0x30]
mov word [eax], 0x100
jmp 0x10046bcc
mov edx, dword [esp + 0x18]
mov esi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x20]
jmp 0x10046b93
mov byte [ebx + 0x29], 1
jmp 0x10046b76
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov dword [esp + 0x40], edx
mov dword [esp + 0x48], ecx
mov dword [esp + 0x44], esi
jmp 0x10046b87
movq xmm0, qword [esp + 0x1c]
pinsrw xmm1, ecx, 1
shr ecx, 0x10
lea edx, [esp + 0x14]
mov word [esp + 0x1a], cx
lea ecx, [esp + 0x3c]
mov dword [esp + 0x1c], eax
movq qword [esp + 0x20], xmm0
mov byte [esp + 0x14], 2
movd dword [esp + 0x16], xmm1
call fcn.1005d4f0
mov eax, dword [esp + 0x3c]
jmp 0x10046b87
mov eax, dword [esp + 8]
mov byte [eax + 0x29], 1
mov eax, dword [esp + 0x30]
mov word [eax], 0
jmp 0x10046bcc
mov byte [esp + 0x40], al
xor eax, eax
mov edx, dword [esp + 0x40]
mov esi, dword [esp + 0x44]
mov ecx, dword [esp + 0x48]
mov dword [esp + 0x88], edx
mov dword [esp + 0x8c], esi
mov edx, dword [esp + 0x30]
mov dword [esp + 0x9c], ecx
movsd xmm0, qword [esp + 0x88]
mov dword [edx + 0x10], ecx
movsd qword [edx + 8], xmm0
mov dword [edx + 4], eax
movsd qword [esp + 0x94], xmm0
mov byte [edx], 1
lea esp, [ebp - 0xc]
pop esi
pop edi
pop ebx
pop ebp
ret
mov ecx, dword [esp + 0x18]
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x20]
jmp 0x10046c05
mov eax, dword [esp + 0x18]
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x1c]
mov edi, eax
and edi, 0xffffff00
jmp 0x10046c00
xor ecx, ecx
xor edi, edi
movzx eax, al
or eax, edi
mov edi, dword [esp + 0x30]
mov dword [edi + 4], ecx
mov dword [edi + 8], eax
mov dword [edi + 0xc], esi
mov dword [edi + 0x10], edx
mov byte [edi], 1
jmp 0x10046bcc
lea ecx, [esp + 0x14]
mov edx, 0x3ca458c
mov dword [esp + 0x14], 0x3ca4578
mov dword [esp + 0x18], 1
mov dword [esp + 0x24], 0
mov dword [esp + 0x1c], 0x3ca6800
mov dword [esp + 0x20], 0
call fcn.10004990
ud2