Function at 0x4015d0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4455b6
mov eax, dword fs:[0]
push eax
sub esp, 0x730
mov eax, dword [0x495bd0]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edx, dword [ebp + 0x20]
mov ecx, dword [ebp + 8]
mov eax, dword [ebp + 0xc]
mov ebx, dword [ebp + 0x10]
mov dword [ebp - 0x620], edx
mov edx, dword [0x4979b0]
mov dword [ebp - 0x62c], ecx
mov dword [ebp - 0x628], eax
mov dword [ebp - 0x61c], edx
cmp edx, 0x40
jb 0x401637
mov dword [ebp - 0x61c], 0x40
mov edx, dword [eax + 8]
mov ecx, dword [ecx + 0x18]
push 0x401520
push 0x401500
push 0x40
mov dword [ebp - 0x618], edx
mov edx, dword [eax + 0x18]
push 0x18
lea eax, [ebp - 0x610]
push eax
mov dword [ebp - 0x638], ecx
mov dword [ebp - 0x634], edx
call fcn.00434661
xor edi, edi
mov dword [ebp - 4], edi
mov dword [ebp - 0x630], edi
mov dword [ebp - 0x624], edi
cmp dword [ebp - 0x61c], edi
jbe 0x401961
lea esi, [ebp - 0x610]
mov ecx, dword [ebp - 0x620]
push ecx
call fcn.004020d0
mov ecx, eax
add esp, 4
mov dword [esi], ecx
test ecx, ecx
je 0x4019c3
test ebx, ebx
je 0x4017ef
cmp dword [ebx], 0x38
jne 0x4017ef
cmp dword [ebx + 4], 0
je 0x4017a6
fldz
fcom qword [ebx + 8]
fnstsw ax
test ah, 5
jnp 0x4016eb
fcom qword [ebx + 0x10]
fnstsw ax
test ah, 5
jnp 0x4016eb
fcomp qword [ebx + 0x18]
fnstsw ax
test ah, 5
jp 0x4017a6
jmp 0x4016ed
fstp st(0)
mov edx, dword [ecx]
mov eax, dword [edx + 8]
push 1
push 0x4463c0
call eax
fld qword [0x4463b8]
fcomp qword [ebx + 8]
fnstsw ax
test ah, 5
jp 0x401710
fld qword [ebx + 8]
jmp 0x401716
fld dword [0x4463b4]
mov ecx, dword [esi]
fstp dword [ebp - 0x614]
mov edx, dword [ecx]
fld dword [ebp - 0x614]
mov eax, dword [edx + 4]
push ecx
fstp dword [esp]
push str.WeightR
call eax
fld qword [0x4463b8]
fcomp qword [ebx + 0x10]
fnstsw ax
test ah, 5
jp 0x401749
fld qword [ebx + 0x10]
jmp 0x40174f
fld dword [0x4463b4]
mov ecx, dword [esi]
fstp dword [ebp - 0x614]
mov edx, dword [ecx]
fld dword [ebp - 0x614]
mov eax, dword [edx + 4]
push ecx
fstp dword [esp]
push str.WeightG
call eax
fld qword [0x4463b8]
fcomp qword [ebx + 0x18]
fnstsw ax
test ah, 5
jp 0x401782
fld qword [ebx + 0x18]
jmp 0x401788
fld dword [0x4463b4]
mov ecx, dword [esi]
fstp dword [ebp - 0x614]
mov edx, dword [ecx]
fld dword [ebp - 0x614]
mov eax, dword [edx + 4]
push ecx
fstp dword [esp]
push str.WeightB
call eax
mov ecx, dword [esi]
mov eax, dword [ebx + 0x20]
mov edx, dword [ecx]
mov edx, dword [edx + 8]
push eax
push str.UseAdaptiveWeighting
call edx
mov ecx, dword [esi]
mov edx, dword [ebx + 0x24]
mov eax, dword [ecx]
mov eax, dword [eax + 8]
push edx
push str.DXT1UseAlpha
call eax
movzx eax, byte [ebx + 0x28]
mov ecx, dword [esi]
mov edx, dword [ecx]
mov edx, dword [edx + 8]
push eax
push str.AlphaThreshold
call edx
mov ecx, dword [esi]
mov edx, dword [ebx + 0x30]
mov eax, dword [ecx]
mov eax, dword [eax + 8]
push edx
push 0x446350
call eax
mov ecx, dword [ebp - 0x62c]
mov edx, dword [ecx + 0x10]
push edx
call fcn.00402cc0
mov edi, dword [ebp - 0x61c]
sub edi, dword [ebp - 0x624]
add esp, 4
mov dword [ebp - 0x614], eax
cmp edi, 1
jbe 0x401850
mov ecx, dword [esi]
mov eax, dword [ecx]
mov edx, dword [eax + 0x18]
call edx
mov ecx, eax
mov eax, dword [ebp - 0x618]
xor edx, edx
div edi
xor edx, edx
lea eax, [ecx + eax - 1]
div ecx
imul eax, ecx
mov ecx, dword [ebp - 0x618]
mov edi, eax
cmp eax, ecx
jb 0x401846
mov edi, ecx
sub ecx, edi
mov dword [ebp - 0x618], ecx
jmp 0x401856
mov edi, dword [ebp - 0x618]
test edi, edi
je 0x40193f
mov eax, dword [ebp - 0x638]
push eax
mov eax, dword [ebp - 0x62c]
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 4]
mov eax, dword [ebp - 0x614]
push ecx
push edi
push edx
push eax
call fcn.00402750
mov ecx, dword [esi]
mov dword [esi + 4], eax
mov eax, dword [ebp - 0x634]
mov edx, dword [ecx]
mov edx, dword [edx + 0x1c]
add esp, 0x14
push eax
mov eax, dword [ebp - 0x628]
mov eax, dword [eax + 0xc]
push eax
mov eax, dword [ebp - 0x628]
mov eax, dword [eax + 4]
push edi
push eax
call edx
mov dword [esi + 8], eax
mov eax, dword [ebp - 0x62c]
mov ecx, dword [eax + 0xc]
mov edx, dword [eax + 4]
mov eax, dword [eax + 0x10]
push ecx
push edi
push edx
push eax
call fcn.00401180
mov ecx, dword [ebp - 0x628]
mov edx, dword [ecx + 4]
add dword [ebp - 0x638], eax
mov eax, dword [ebp - 0x620]
push edi
push edx
push eax
call fcn.004024b0
add dword [ebp - 0x634], eax
add esp, 0x1c
cmp dword [esi + 4], 0
je 0x4019e6
cmp dword [esi + 8], 0
je 0x4019e6
mov ecx, dword [ebp + 0x14]
mov edx, dword [ebp + 0x18]
mov eax, dword [ebp + 0x1c]
mov dword [esi + 0xc], ecx
lea ecx, [ebp - 0x63c]
push ecx
push 0
push esi
push 0x401570
push 0
push 0
mov dword [esi + 0x10], edx
mov dword [esi + 0x14], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [ebp - 0x630]
mov dword [ebp + ecx*4 - 0x73c], eax
inc ecx
mov dword [ebp - 0x630], ecx
mov eax, dword [ebp - 0x624]
inc eax
add esi, 0x18
mov dword [ebp - 0x624], eax
cmp eax, dword [ebp - 0x61c]
jb 0x40168f
mov edi, dword [ebp - 0x630]
push 0xffffffffffffffff
push 1
lea ecx, [ebp - 0x73c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_WaitForMultipleObjects]
xor ebx, ebx
xor esi, esi
test edi, edi
je 0x4019b1
test ebx, ebx
jne 0x40199e
mov eax, dword [ebp + esi*4 - 0x73c]
lea edx, [ebp - 0x620]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_GetExitCodeThread]
test eax, eax
je 0x40199e
mov ebx, dword [ebp - 0x620]
mov ecx, dword [ebp + esi*4 - 0x73c]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
inc esi
cmp esi, edi
jb 0x40197b
mov eax, ebx
sub eax, 0
je 0x401a10
dec eax
je 0x401a09
dec eax
jne 0x401a09
lea esi, [eax + 1]
jmp 0x401a12
push 0x401520
push 0x40
push 0x18
lea edx, [ebp - 0x610]
push edx
mov dword [ebp - 4], 0xffffffff
call fcn.00434594
mov eax, 7
jmp 0x401a30
push 0x401520
push 0x40
push 0x18
lea eax, [ebp - 0x610]
push eax
mov dword [ebp - 4], 0xffffffff
call fcn.00434594
mov eax, 8
jmp 0x401a30
mov esi, 8
jmp 0x401a12
xor esi, esi
push 0x401520
push 0x40
push 0x18
lea edx, [ebp - 0x610]
push edx
mov dword [ebp - 4], 0xffffffff
call fcn.00434594
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00434aaf
mov esp, ebp
pop ebp
ret