Function at 0x401000
Capabilities:
Allocate thread local storage

Disassembly:
push 0x8c
push 0
push 0x40e428
call sub.MSVCRT.dll_memset
add esp, 0xc
push 0
call sub.KERNEL32.dll_GetModuleHandleA
mov dword [0x40e42c], eax
push 0
push 0x1000
push 0
call sub.KERNEL32.dll_HeapCreate
mov dword [0x40e428], eax
call fcn.0040a330
call fcn.0040a1de
call fcn.00408e60
call fcn.00407ecb
call fcn.004075fa
call fcn.00406ab0
call fcn.00406a90
call fcn.0040625c
call fcn.0040618f
call fcn.0040611f
call fcn.00405e78
call fcn.00405880
call fcn.00405449
call fcn.00404596
call fcn.00404069
push eax
call fcn.00406add
mov dword [0x40e46c], eax
mov dword [0x40e44c], 0
mov edx, 0x40d098
lea ecx, [0x40e444]
call fcn.00404088
push str.The_University_of_Liverpool___SD_TaskPoll
push 1
push 0
call sub.KERNEL32.dll_CreateMutexA
mov dword [0x40e48c], eax
call sub.KERNEL32.dll_GetLastError
mov dword [0x40e470], eax
mov ebx, dword [0x40e48c]
and ebx, ebx
je 0x4010e8
mov ebx, dword [0x40e470]
and ebx, ebx
jne 0x4010e8
jmp 0x4010ef
mov eax, 1
jmp 0x4010f1
xor eax, eax
and eax, eax
je 0x401110
push dword [0x40e48c]
call sub.KERNEL32.dll_ReleaseMutex
push dword [0x40e48c]
call sub.KERNEL32.dll_CloseHandle
jmp 0x401705
mov edx, str.C:Temp_sd_taskpoll.log
lea ecx, [0x40e450]
call fcn.00404088
push 1
push 0
push 1
call fcn.00402a3f
mov dword [0x40e488], 0
push dword [0x40e634]
push 0
push 0
push dword [0x40e634]
mov edx, str.App_Details:_SD_TaskPoll_2.2.0
call fcn.0040a3b0
mov edx, dword [0x40e634]
push edx
push edx
push 0x557189f8
push str._yyyy._mm._dd__hh:_ii
call fcn.00409b7c
pop eax
mov edx, dword [0x40d4fc]
add dword [esp], edx
call fcn.00402366
pop dword [0x40e634]
push dword [0x40e634]
push 0
push 0
push dword [0x40e634]
mov edx, str.Logging_started:
call fcn.0040a3b0
mov edx, dword [0x40e634]
push edx
push edx
call fcn.00409f19
push eax
push str._yyyy._mm._dd__hh:_ii
call fcn.00409b7c
pop eax
mov edx, dword [0x40d4fc]
add dword [esp], edx
call fcn.00402366
pop dword [0x40e634]
push dword [0x40e634]
push 0
push 0
push dword [0x40e634]
mov edx, str._To_screen:
call fcn.0040a3b0
push dword [0x40e634]
push 0
push dword [0x40e488]
call fcn.004022c9
pop eax
mov edx, dword [0x40d4fc]
add dword [esp], edx
call fcn.00402366
pop dword [0x40e634]
push dword [0x40e634]
push 0
push 0
push dword [0x40e634]
mov edx, str._To_console:
call fcn.0040a3b0
push dword [0x40e634]
push 0
push dword [0x40e460]
call fcn.004022c9
pop eax
mov edx, dword [0x40d4fc]
add dword [esp], edx
call fcn.00402366
pop dword [0x40e634]
push dword [0x40e634]
push 0
push 0
push dword [0x40e634]
mov edx, str._To_file:
call fcn.0040a3b0
push dword [0x40e634]
push 0
push dword [0x40e464]
call fcn.004022c9
pop eax
mov edx, dword [0x40d4fc]
add dword [esp], edx
call fcn.00402366
pop dword [0x40e634]
push dword [0x40e634]
push 0
push 0
push dword [0x40e634]
mov edx, str._Filename:
call fcn.0040a3b0
mov edx, dword [0x40e450]
call fcn.0040a3b0
mov edx, dword [0x40d4fc]
add dword [esp], edx
call fcn.00402366
pop dword [0x40e634]
push dword [0x40e634]
push 0
push 0
push dword [0x40e634]
mov edx, str._Log_level:
call fcn.0040a3b0
mov edx, dword [0x40e634]
push edx
push edx
mov eax, dword [0x40e454]
cdq
push edx
push eax
call fcn.00406ce0
pop eax
mov edx, dword [0x40d4fc]
add dword [esp], edx
call fcn.00402366
pop dword [0x40e634]
mov byte [0x40e49f], 0
mov byte [0x40e49c], 0
mov byte [0x40e49d], 0
call fcn.004026b3
call fcn.004028e8
mov byte [0x40e49e], 0
mov dword [0x40e490], 0x3e8
mov ebx, dword [0x40e490]
imul ebx, ebx, 0x3c
mov dword [0x40e490], ebx
cmp byte [0x40e49f], 0
je 0x4016b8
push dword [0x40e430]
call fcn.00408890
mov dword [0x40e480], eax
mov ebx, dword [0x40e480]
add ebx, dword [0x40e498]
imul ebx, dword [0x40e490]
mov dword [0x40e438], ebx
push dword [0x40e634]
push 0
push 0
push dword [0x40e634]
mov edx, str.Waiting
call fcn.0040a3b0
mov edx, dword [0x40e634]
push edx
push edx
mov eax, dword [0x40e438]
cdq
push edx
push eax
call fcn.00406ce0
pop eax
mov edx, str._msec
call fcn.0040a3b0
mov edx, dword [0x40e634]
push edx
push edx
mov eax, dword [0x40e480]
cdq
push edx
push eax
call fcn.00406ce0
pop eax
mov edx, dword [0x40d4fc]
add dword [esp], edx
call fcn.00402366
pop dword [0x40e634]
call fcn.00406add
mov ebx, eax
add ebx, dword [0x40e438]
mov dword [0x40e484], ebx
push 0x3e8
call fcn.004045ee
mov dword [0x40e468], eax
mov ebx, dword [0x40e468]
cmp ebx, 0x333c
jne 0x401461
mov byte [0x40e49e], 1
push 1
call fcn.00404469
call fcn.00406add
mov dword [0x40e434], eax
mov ebx, dword [0x40e434]
cmp ebx, dword [0x40e484]
jle 0x401433
mov dword [0x40e484], 0
movsx ebx, byte [0x40e49e]
and ebx, ebx
jne 0x4016b8
call fcn.00406add
mov dword [0x40e434], eax
movsx ebx, byte [0x40e49c]
cmp ebx, 1
jne 0x4014ad
jmp 0x40167a
cmp byte [0x40e49d], 0
je 0x401550
push 0
push 0
push str.Resumed_from_hibernate___adding_random_offset_to_timer
call fcn.00402366
push dword [0x40e430]
call fcn.00408890
mov dword [0x40e480], eax
mov ebx, dword [0x40e434]
mov edi, dword [0x40e480]
add edi, dword [0x40e498]
imul edi, dword [0x40e490]
add ebx, edi
mov dword [0x40e484], ebx
push dword [0x40e634]
push 0
push 0
push dword [0x40e634]
mov edx, str.Nextrun:
call fcn.0040a3b0
mov edx, dword [0x40e634]
push edx
push edx
mov eax, dword [0x40e484]
cdq
push edx
push eax
call fcn.00406ce0
pop eax
mov edx, dword [0x40d4fc]
add dword [esp], edx
call fcn.00402366
pop dword [0x40e634]
mov byte [0x40e49d], 0
mov ebx, dword [0x40e434]
cmp ebx, dword [0x40e484]
jle 0x401611
push dword [0x40e634]
push 0
push 0
push dword [0x40e634]
mov edx, str.Running_task:
call fcn.0040a3b0
mov edx, dword [0x40e45c]
call fcn.0040a3b0
mov edx, dword [0x40d4fc]
add dword [esp], edx
call fcn.00402366
pop dword [0x40e634]
push dword [0x40e45c]
call fcn.00407a84
mov ebx, dword [0x40e434]
mov edi, dword [0x40e430]
imul edi, dword [0x40e490]
add ebx, edi
mov dword [0x40e484], ebx
push dword [0x40e634]
push 0
push 0
push dword [0x40e634]
mov edx, str.Nextrun:
call fcn.0040a3b0
mov edx, dword [0x40e634]
push edx
push edx
mov eax, dword [0x40e484]
cdq
push edx
push eax
call fcn.00406ce0
pop eax
mov edx, dword [0x40d4fc]
add dword [esp], edx
call fcn.00402366
pop dword [0x40e634]
push str.c:_temp_taskpoll_exit.dat
call fcn.0040282f
and eax, eax
je 0x401644
push 0
push 0
push str.Exitting_due_to_flag_file
call fcn.00402366
push str.c:_temp_taskpoll_exit.dat
call fcn.00408a9e
mov byte [0x40e49e], 1
push str.c:_temp_taskpoll_now.dat
call fcn.0040282f
and eax, eax
je 0x40167a
push 0
push 0
push str.Checking_now_due_to_flag_file
call fcn.00402366
push str.c:_temp_taskpoll_now.dat
call fcn.00408a9e
mov eax, dword [0x40e434]
mov dword [0x40e484], eax
push 0x3e8
call fcn.004045ee
mov dword [0x40e468], eax
mov ebx, dword [0x40e468]
cmp ebx, 0x333c
jne 0x4016a8
mov byte [0x40e49e], 1
push 1
call fcn.00404469
movsx ebx, byte [0x40e49e]
cmp ebx, 1
jne 0x401492
push dword [0x40e634]
push 0
push 0
push dword [0x40e634]
mov edx, str.Completed_successfully:
call fcn.0040a3b0
mov edx, dword [0x40e634]
push edx
push edx
call fcn.00409f19
push eax
push str._yyyy._mm._dd__hh:_ii
call fcn.00409b7c
pop eax
mov edx, dword [0x40d4fc]
add dword [esp], edx
call fcn.00402366
pop dword [0x40e634]
push 0
call 0x401724
call fcn.0040a380
push dword [0x40e428]
call sub.KERNEL32.dll_HeapDestroy
call sub.KERNEL32.dll_ExitProcess
call fcn.0040457f
call fcn.004057f6
call fcn.00405ee8
call fcn.00406183
call fcn.004062ea
call fcn.00407ee6
call fcn.00408aac
call fcn.00408e50
call fcn.00406ad0
ret