Function at 0x418620
Capabilities:
Create thread

Disassembly:
sub esp, 0x10
push ebp
mov ebp, dword [esp + 0x18]
push esi
push edi
push 0x914
push 0
push ebp
mov edi, eax
mov esi, ecx
call fcn.004bd240
mov eax, dword [esp + 0x30]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x38]
add esp, 0xc
mov dword [ebp + 0x10], eax
mov dword [ebp], ecx
mov dword [ebp + 4], edi
mov dword [ebp + 8], edx
cmp edi, 0x4650
jbe 0x41889d
mov dword [ebp + 0x10], 0
mov ecx, dword [esi + 0x37cc]
mov eax, 0xaaaaaaab
mul ecx
shr edx, 4
mov dword [esp + 0x14], edx
fild dword [esp + 0x14]
test edx, edx
jns 0x41868b
fadd qword [0x5b4428]
mov eax, edi
mov dword [esp + 0x14], eax
fild dword [esp + 0x14]
test eax, eax
jns 0x41869f
fadd qword [0x5b4428]
fdiv qword [0x5b47e8]
fcom st(1)
fnstsw ax
test ah, 0x41
jne 0x4186b2
fstp st(0)
jmp 0x4186b4
fstp st(1)
fnstcw word [esp + 0xc]
push ebx
movzx eax, word [esp + 0x10]
or eax, 0xc00
mov dword [esp + 0x14], eax
fldcw word [esp + 0x14]
fistp qword [esp + 0x18]
mov ebx, dword [esp + 0x18]
mov dword [esp + 0x14], ebx
fldcw word [esp + 0x10]
cmp ebx, 0x10000
jb 0x4186ea
mov ebx, 0x10000
jmp 0x4186f3
test ebx, ebx
jne 0x4186f7
mov ebx, 0x8000
mov dword [esp + 0x14], ebx
cmp dword [0x5d5f9c], 0
jle 0x418712
shr ecx, 0xa
push ecx
push ebx
push 0x5ae324
call fcn.004b7f6d
add esp, 0xc
mov ecx, dword [esi + 0x37cc]
mov edx, dword [esi + 0x424]
shr ecx, 0xa
push ecx
push ebx
push 0x5ae324
push edx
call fcn.00443960
mov ecx, dword [esi + 0x37d0]
add esp, 0x10
mov dword [esp + 0x10], ecx
cmp ecx, 2
jb 0x418748
cmp edi, 0x30d40
jae 0x41874f
mov ecx, 1
jmp 0x418759
cmp ecx, 0x20
jb 0x41875d
mov ecx, 0x20
mov dword [esp + 0x10], ecx
xor edx, edx
xor esi, esi
xor eax, eax
xor ebx, ebx
mov dword [ebp + 0xc], ecx
mov dword [esp + 0x18], edx
test edi, edi
je 0x4187aa
cmp edi, 2
jl 0x418798
mov ecx, dword [esp + 0x28]
lea edx, [edi - 2]
shr edx, 1
add ecx, 0x14
inc edx
lea ebx, [edx + edx]
add esi, dword [ecx - 0x10]
add eax, dword [ecx]
add ecx, 0x20
dec edx
jne 0x418785
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x18]
cmp ebx, edi
jae 0x4187a6
mov edx, dword [esp + 0x28]
add ebx, ebx
mov edx, dword [edx + ebx*8 + 4]
add esi, eax
add edx, esi
mov eax, edx
xor edx, edx
div ecx
xor ecx, ecx
xor ebx, ebx
xor edx, edx
add eax, 0x3e8
mov dword [esp + 0x18], eax
xor eax, eax
test edi, edi
je 0x418827
lea esi, [ebp + 0x14]
mov ebp, dword [esp + 0x28]
add ebp, 4
mov dword [esp + 0x10], ebp
mov ebp, dword [esp + 0x10]
add ecx, dword [ebp]
lea ebp, [edi - 1]
cmp edx, ebp
je 0x4187e7
cmp ecx, dword [esp + 0x18]
jb 0x418819
mov ebp, dword [esp + 0x28]
mov ecx, esi
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x2c]
mov dword [ecx + 0x10], eax
mov eax, dword [esp + 0x14]
mov dword [ecx + 0x18], eax
mov eax, dword [esp + 0x30]
mov dword [esi], ebx
mov dword [ecx + 0x20], eax
inc ebx
add esi, 0x48
mov dword [ecx + 4], ebp
mov dword [ecx + 0xc], edx
mov dword [ecx + 0x14], edi
lea eax, [edx + 1]
xor ecx, ecx
add dword [esp + 0x10], 0x10
inc edx
cmp edx, edi
jb 0x4187d3
mov ebp, dword [esp + 0x24]
mov dword [ebp + 0xc], ebx
xor edi, edi
dec ebx
je 0x41888a
mov ebx, dword [sym.imp.KERNEL32.dll_CreateEventA]
lea esi, [ebp + 0x54]
push 0
push 1
push 0
push 0
mov dword [esi - 8], 0
call ebx
push 0
push 0
push 0
push 0
mov dword [esi], eax
call ebx
push 0
push 0
lea ecx, [esi - 0x40]
push ecx
push 0x4185a0
push 0
push 0
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov edx, dword [esi + 4]
push 0xffffffffffffffff
push edx
mov dword [esi - 4], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp + 0xc]
inc edi
dec eax
add esi, 0x48
cmp edi, eax
jb 0x418838
pop ebx
lea ecx, [edi + edi*8]
pop edi
pop esi
lea eax, [ebp + ecx*8 + 0x14]
pop ebp
add esp, 0x10
jmp fcn.00417ff0
pop edi
pop esi
pop ebp
add esp, 0x10
ret