Function at 0x401000
Capabilities:
Create thread

Disassembly:
sub esp, 0x88
push ebx
push ebp
push esi
mov esi, dword [esp + 0x98]
push edi
lea eax, [esp + 0x5c]
xor ebx, ebx
push eax
mov dword [esp + 0x24], ebx
lea edi, [esi + 0x5c0]
call fcn.004565a0
add esp, 4
push 0xa
push edi
call fcn.00457f70
lea ecx, [esp + 0x64]
push 0xa
push ecx
mov ebp, eax
call fcn.00456980
lea edx, [ebp - 1]
push edx
lea eax, [esp + 0x70]
push eax
mov ecx, eax
push ecx
call fcn.00459240
add esp, 0x1c
lea edx, [esp + 0x5c]
push edi
push edx
call fcn.00456920
xor ecx, ecx
test eax, eax
setg cl
lea edx, [esp + 0x64]
push edx
sub ebp, ecx
mov dword [esp + 0x38], ebp
call fcn.00456900
add esp, 0xc
mov eax, esi
call fcn.00401c20
test eax, eax
je 0x4017eb
push 0x402400
push 2
mov dword [0x5d6400], ebx
call fcn.004b76c9
call fcn.004020b0
lea eax, [esp + 0x88]
push eax
call fcn.004565a0
lea ecx, [esp + 0x98]
add esp, 0xc
push ecx
call fcn.004565a0
mov edi, dword [0x5d6980]
lea edx, [edi + edi*2]
shl edx, 7
add esp, 4
push edx
call fcn.004b7263
add esp, 4
mov dword [esp + 0x14], eax
cmp edi, ebx
jle 0x40117a
mov esi, eax
add esi, 0xc
mov eax, dword [esp + 0x9c]
lea edi, [esi - 0xc]
push edi
mov dword [esi + 0x104], eax
mov dword [esi + 0x108], ebx
call fcn.004565a0
add esp, 4
push esi
call fcn.004565a0
lea eax, [esi + 0xc]
add esp, 4
push eax
call fcn.00481940
mov eax, dword [0x5d643c]
mov ecx, 0x7f13ac69
mul ecx
add esp, 4
xor ebp, ebp
add eax, dword [0x5d6438]
adc edx, ebp
mov dword [0x5d6438], edx
push eax
lea edx, [esi + 0xa4]
push edx
mov dword [0x5d643c], eax
call fcn.004568d0
mov eax, dword [esi + 0x104]
add eax, 0x5c0
push eax
push edi
call fcn.00456880
mov edi, dword [0x5d6980]
mov dword [esi + 0xc], ebp
mov dword [esi + 0x10c], ebp
inc ebx
add esp, 0x10
add esi, 0x180
cmp ebx, edi
jl 0x4010e5
mov esi, dword [esp + 0x9c]
mov ecx, dword [esi + 0x9f0]
xor edx, edx
mov eax, ecx
div edi
xor ebp, ebp
cmp edx, ebp
je 0x401199
mov eax, edi
sub eax, edx
jmp 0x40119b
xor eax, eax
add ecx, eax
mov dword [esi + 0x9f0], ecx
cmp dword [0x5d5f9c], ebp
jl 0x4012a9
xor ebx, ebx
xor edx, edx
mov dword [esp + 0x18], ebp
cmp edi, 2
jl 0x4011e0
mov eax, dword [esp + 0x14]
lea ecx, [edi - 2]
shr ecx, 1
add eax, 0x298
inc ecx
lea edx, [ecx + ecx]
mov edi, edi
add ebx, dword [eax - 0x180]
add ebp, dword [eax]
add eax, 0x300
dec ecx
jne 0x4011d0
cmp edx, edi
jge 0x4011f9
lea eax, [edx + edx*2]
mov edx, dword [esp + 0x14]
shl eax, 7
mov eax, dword [eax + edx + 0x118]
mov dword [esp + 0x18], eax
lea ecx, [esp + 0x68]
push ecx
call fcn.004565a0
add esp, 4
mov edi, esi
push 0xa
add edi, 0x5c0
push edi
call fcn.00457f70
lea edx, [esp + 0x70]
push 0xa
push edx
mov esi, eax
call fcn.00456980
lea eax, [esi - 1]
push eax
lea ecx, [esp + 0x7c]
push ecx
mov edx, ecx
push edx
call fcn.00459240
add esp, 0x1c
lea eax, [esp + 0x68]
push edi
push eax
call fcn.00456920
xor ecx, ecx
test eax, eax
setg cl
lea edx, [esp + 0x70]
push edx
sub esi, ecx
call fcn.00456900
add esp, 0xc
push esi
mov esi, dword [esp + 0xa0]
mov eax, dword [esi + 0x9f0]
add ebx, ebp
add ebx, dword [esp + 0x1c]
push eax
push ebx
push str.ecm:__d__d_curves_on_C_d_
call fcn.004b7f6d
push 0
mov eax, esi
call fcn.00402420
add esp, 0x14
push 0x51a99c
call fcn.004b7f6d
add esp, 4
call fcn.004b7416
add eax, 0x20
push eax
call fcn.004b7c36
mov edi, dword [0x5d6980]
add esp, 4
lea ecx, [edi - 1]
xor ebx, ebx
test ecx, ecx
jle 0x40131f
mov esi, dword [esp + 0x14]
mov ebp, dword [sym.imp.KERNEL32.dll_CreateEventA]
add esi, 0x174
push 0
push 1
push 0
push 0
mov dword [esi - 8], 0
call ebp
push 0
push 0
push 0
push 0
mov dword [esi], eax
call ebp
push 0
push 0
lea edx, [esi - 0x174]
push edx
push 0x401dd0
push 0
push 0
mov dword [esi + 4], eax
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [esi - 4], eax
mov eax, dword [esi + 4]
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edi, dword [0x5d6980]
inc ebx
lea ecx, [edi - 1]
add esi, 0x180
cmp ebx, ecx
jl 0x4012c2
mov edx, dword [esp + 0x9c]
fldz
xor eax, eax
fstp qword [esp + 0x50]
mov dword [esp + 0x24], eax
mov dword [esp + 0x28], eax
mov eax, dword [edx + 0x9f0]
xor edx, edx
div edi
test eax, eax
je 0x40178e
mov ebp, dword [esp + 0x20]
cmp dword [0x5d6400], 0
mov eax, dword [esp + 0x9c]
jne 0x4017f8
cmp dword [eax + 0x9dc], 0xbb80
jbe 0x4013c9
lea ecx, [esp + 0x30]
test ecx, ecx
je 0x4013c9
lea edx, [esp + 0x40]
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemTimeAsFileTime]
mov ecx, dword [esp + 0x44]
xor esi, esi
push esi
xor eax, eax
or eax, dword [esp + 0x44]
push 0xa
or ecx, esi
push ecx
push eax
call fcn.004bdc20
mov esi, eax
push 0
add esi, 0xb779c000
push 0xf4240
adc edx, 0xffd6a169
push edx
push esi
call fcn.004bdc20
mov edi, dword [0x5d6980]
mov dword [esp + 0x30], eax
imul eax, eax, 0xf4240
sub esi, eax
mov dword [esp + 0x34], esi
xor ebx, ebx
test edi, edi
jle 0x401416
mov esi, dword [esp + 0x14]
lea ebp, [ebx + 2]
call fcn.00401b50
mov eax, dword [0x5d6980]
dec eax
cmp ebx, eax
jne 0x4013ee
mov eax, esi
call fcn.00402190
jmp 0x401401
mov ecx, dword [esi + 0x174]
push ecx
mov dword [esi + 0x16c], ebp
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edi, dword [0x5d6980]
inc ebx
add esi, 0x180
cmp ebx, edi
jl 0x4013d6
mov ebp, dword [esp + 0x20]
xor esi, esi
test edi, edi
jle 0x401449
mov ebx, dword [esp + 0x14]
invalid