Function at 0x409f10
Capabilities:
Create thread

Disassembly:
sub esp, 0x18
push ebx
push ebp
mov ebp, dword [0x5d6980]
push esi
push edi
mov edi, eax
lea eax, [ebp + ebp*4]
shl eax, 8
push eax
call fcn.004b7263
add esp, 4
mov esi, eax
xor ebx, ebx
mov dword [esp + 0x14], esi
test ebp, ebp
jle 0x40a0aa
lea eax, [edi + 0x34]
mov ecx, 0x34
add esi, 0x50
sub ecx, eax
mov dword [esp + 0x24], ecx
push ebx
lea ecx, [esi - 0x50]
push str.rels_d.dat
push ecx
call fcn.004b70c5
mov edx, dword [edi]
mov ebp, dword [esp + 0x38]
mov dword [esi], edx
mov eax, dword [edi + 4]
mov dword [esi + 4], eax
mov ecx, dword [edi + 8]
mov dword [esi + 8], ecx
fld qword [edi + 0x20]
fstp qword [esi + 0x20]
add esp, 0xc
fld qword [edi + 0x28]
fstp qword [esi + 0x28]
mov edx, dword [edi + 0xc]
mov dword [esi + 0xc], edx
mov eax, dword [edi + 0x10]
mov dword [esi + 0x10], eax
mov ecx, dword [edi + 0x14]
mov dword [esi + 0x14], ecx
mov edx, dword [edi + 0x18]
mov dword [esi + 0x18], edx
mov eax, dword [ebp + 0x1308]
test eax, eax
je 0x409fef
mov dword [esp + 0x18], eax
fild dword [esp + 0x18]
jns 0x409fb4
fadd qword [0x5b4428]
fidiv dword [0x5d6980]
sub esp, 8
fstp qword [esp]
call fcn.004b8640
fnstcw word [esp + 0x1a]
add esp, 8
movzx eax, word [esp + 0x12]
or eax, 0xc00
mov dword [esp + 0x18], eax
fldcw word [esp + 0x18]
fistp qword [esp + 0x18]
mov eax, dword [esp + 0x18]
mov dword [esi + 0x30], eax
fldcw word [esp + 0x12]
jmp 0x40a038
mov ecx, dword [edi + 0x30]
fild dword [edi + 0x30]
test ecx, ecx
jns 0x409fff
fadd qword [0x5b4428]
fidiv dword [0x5d6980]
sub esp, 8
fstp qword [esp]
call fcn.004b8640
fnstcw word [esp + 0x1a]
add esp, 8
movzx eax, word [esp + 0x12]
or eax, 0xc00
mov dword [esp + 0x18], eax
fldcw word [esp + 0x18]
fistp qword [esp + 0x18]
mov edx, dword [esp + 0x18]
mov dword [esi + 0x30], edx
fldcw word [esp + 0x12]
mov eax, dword [edi + 0x438]
mov dword [esi + 0x438], eax
mov ecx, dword [edi + 0x43c]
mov dword [esi + 0x43c], ecx
mov edx, dword [ebp + 0x12fc]
mov dword [esi + 0x450], edx
mov eax, dword [edi + 0x434]
mov edx, dword [esp + 0x24]
mov dword [esi + 0x434], eax
lea eax, [edi + 0x34]
add edx, esi
mov cl, byte [eax]
mov byte [edx + eax], cl
inc eax
test cl, cl
jne 0x40a071
mov dword [esi + 0x488], ebx
mov dword [esi + 0x484], ebp
mov ebp, dword [0x5d6980]
mov dword [esi + 0x48c], 0
inc ebx
add esi, 0x500
cmp ebx, ebp
jl 0x409f50
mov esi, dword [esp + 0x14]
lea edx, [ebp - 1]
xor ebx, ebx
test edx, edx
jle 0x40a120
add esi, 0x4f0
mov ebp, dword [sym.imp.KERNEL32.dll_CreateEventA]
push 0
push 1
push 0
push 0
mov dword [esi - 0x10], 0
call ebp
push 0
push 0
push 0
push 0
mov dword [esi], eax
call ebp
push 0
push 0
mov dword [esi + 4], eax
lea eax, [esi - 0x4f0]
push eax
push 0x40a490
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov ecx, dword [esi + 4]
push 0xffffffffffffffff
push ecx
mov dword [esi - 4], eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov ebp, dword [0x5d6980]
inc ebx
lea edx, [ebp - 1]
add esi, 0x500
cmp ebx, edx
jl 0x40a0b9
mov esi, dword [esp + 0x14]
test ebp, ebp
jle 0x40a14c
lea eax, [esi + 0x80]
lea ebx, [ebx]
mov ecx, dword [edi + 0x434]
mov edx, dword [eax]
mov dword [eax + 0x404], ecx
add dword [edi + 0x434], edx
add eax, 0x500
dec ebp
jne 0x40a130
mov eax, dword [esp + 0x2c]
add eax, 0x24
push 0x51a9e0
push eax
call fcn.004b80e6
mov esi, eax
add esp, 8
test esi, esi
jne 0x40a191
call fcn.004b7db1
mov ecx, dword [eax]
push ecx
call fcn.004b731f
add esp, 4
push eax
push str.fopen_error:__s_n
call fcn.004b7f6d
push str.could_not_open_yafu_logfile_for_appending_n
call fcn.004b7f6d
add esp, 0xc
jmp 0x40a1af
mov edx, dword [0x5d6980]
push edx
push str.nfs:_commencing_lattice_sieving_with__d_threads_n
push esi
call fcn.00443960
add esp, 0xc
push esi
call fcn.004b8276
add esp, 4
mov eax, dword [0x5d6980]
xor ebp, ebp
test eax, eax
jle 0x40a1f6
mov ebx, dword [esp + 0x14]
add ebx, 0x4f0
dec eax
cmp ebp, eax
jne 0x40a1d6
lea esi, [ebx - 0x4f0]
call fcn.0040a2e0
jmp 0x40a1e6
mov eax, dword [ebx]
push eax
mov dword [ebx - 0x10], 2
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov eax, dword [0x5d6980]
inc ebp
add ebx, 0x500
cmp ebp, eax
jl 0x40a1c4
xor esi, esi
test eax, eax
jle 0x40a228
mov ebx, dword [esp + 0x14]
add ebx, 0x4f4
lea ecx, [eax - 1]
cmp esi, ecx
jge 0x40a21d
mov edx, dword [ebx]
push 0xffffffffffffffff
push edx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [0x5d6980]
inc esi
add ebx, 0x500
cmp esi, eax
jl 0x40a206
xor ebx, ebx
test eax, eax
jle 0x40a26c
mov esi, dword [esp + 0x14]
mov eax, dword [esp + 0x2c]
mov ecx, dword [eax + 0x2368]
push ecx
mov eax, esi
call fcn.00405460
mov edx, dword [esi + 0x48c]
add dword [edi + 0x43c], edx
add esp, 4
push esi
call fcn.004b7dfa
mov eax, dword [0x5d6980]
inc ebx
add esp, 4
add esi, 0x500
cmp ebx, eax
jl 0x40a232
dec eax
xor ebx, ebx
test eax, eax
jle 0x40a2c3
mov esi, dword [esp + 0x14]
mov edi, dword [sym.imp.KERNEL32.dll_CloseHandle]
add esi, 0x4ec
mov ebp, 4
mov eax, dword [esi + 4]
push eax
mov dword [esi - 0xc], ebp
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov ecx, dword [esi]
push 0xffffffffffffffff
push ecx
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov edx, dword [esi]
push edx
call edi
mov eax, dword [esi + 4]
push eax
call edi
mov ecx, dword [esi + 8]
push ecx
call edi
mov edx, dword [0x5d6980]
inc ebx
dec edx
add esi, 0x500
cmp ebx, edx
jl 0x40a288
mov eax, dword [esp + 0x14]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x18
mov dword [esp + 4], eax
jmp fcn.004b7229