Function at 0x612a60
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x6dd010
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x7e500c]
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 ebx, ecx
mov dword [ebp - 0x14], ebx
lea edi, [ebx + 0xc]
push edi
mov dword [ebp - 0x48], edi
call dword [sym.imp.KERNEL32.DLL_EnterCriticalSection]
mov ecx, dword [0x8076bc]
test ecx, ecx
je 0x612ab0
cmp byte [0x8076b8], 0
jne 0x612abb
call fcn.006115c0
mov ecx, dword [0x8076bc]
mov eax, dword [ecx]
push str.Starting_download.
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x707770]
call esi
add esp, 8
lea ecx, [ebx + 0x590]
call fcn.006213c0
cmp byte [ebx + 5], 0
jne 0x612b60
push 0x1c
xor eax, eax
mov dword [ebp - 0x2c], 0
push str.download_yet_not_initialized
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x28], 7
mov word [ebp - 0x3c], ax
call fcn.004271d0
lea ecx, [ebx + 0x3b8]
mov dword [ebp - 4], 0
lea eax, [ebp - 0x3c]
mov dword [ebx + 0x3b0], 0xfffffff6
cmp ecx, eax
je 0x612b36
cmp dword [ebp - 0x28], 8
push dword [ebp - 0x2c]
cmovae eax, dword [ebp - 0x3c]
push eax
call fcn.004271d0
lea ecx, [ebp - 0x3c]
mov dword [ebx + 0x3b4], 0
mov byte [ebx + 0x3d4], 1
call fcn.00427170
push edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, 0xfffffffc
jmp 0x6132a3
cmp dword [ebx + 0x598], 3
je 0x612bf2
cmp dword [ebx + 0x598], 5
je 0x612bf2
push 0x4f
xor eax, eax
mov dword [ebp - 0x2c], 0
push str.download_is_in_running_state._Should_be_paused_before_any_preference_can_be_set
lea ecx, [ebp - 0x3c]
mov dword [ebp - 0x28], 7
mov word [ebp - 0x3c], ax
call fcn.004271d0
lea ecx, [ebx + 0x3b8]
mov dword [ebp - 4], 1
lea eax, [ebp - 0x3c]
mov dword [ebx + 0x3b0], 0xfffffff6
cmp ecx, eax
je 0x612bc8
cmp dword [ebp - 0x28], 8
push dword [ebp - 0x2c]
cmovae eax, dword [ebp - 0x3c]
push eax
call fcn.004271d0
lea ecx, [ebp - 0x3c]
mov dword [ebx + 0x3b4], 0
mov byte [ebx + 0x3d4], 1
call fcn.00427170
push edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, 0x1e
jmp 0x6132a3
lea ecx, [ebx + 0x70]
call fcn.0061d190
test al, al
jne 0x612c3e
mov ecx, dword [0x8076bc]
test ecx, ecx
je 0x612c10
cmp byte [0x8076b8], al
jne 0x612c1b
call fcn.006115c0
mov ecx, dword [0x8076bc]
mov eax, dword [ecx]
push str.failed_to_init_the_global_file_data_for_downloading
push 0x71a27c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x707770]
call esi
add esp, 0xc
push edi
jmp 0x61329a
cmp byte [ebx + 0x266], 0
mov ecx, ebx
je 0x612c50
call fcn.00611c50
jmp 0x612c55
call fcn.00611fd0
mov esi, eax
test esi, esi
je 0x612e15
cmp byte [ebx + 0x266], 0
jne 0x612ffe
cmp byte [ebx + 0x3e4], 0
lea edi, [ebx + 0x3e4]
je 0x612ccb
lea ecx, [edi + 4]
call fcn.00616890
test al, al
jne 0x612cc8
mov eax, dword [edi + 0x28]
lea ecx, [ebp - 0x68]
mov dword [ebp - 0x74], eax
mov eax, dword [edi + 0x2c]
mov dword [ebp - 0x70], eax
mov eax, dword [edi + 0x30]
mov dword [ebp - 0x6c], eax
lea eax, [edi + 0x34]
push eax
call fcn.00427050
mov eax, dword [edi + 0x4c]
lea ecx, [edi + 0xcc]
mov dword [ebp - 0x50], eax
mov eax, dword [edi + 0x50]
mov dword [ebp - 0x4c], eax
lea eax, [ebp - 0x74]
push eax
call fcn.00613cb0
lea ecx, [ebp - 0x68]
call fcn.00427170
mov byte [edi], 0
mov ecx, edi
call fcn.0061aa40
test al, al
je 0x612d8d
cmp dword [edi + 0xc8], 8
lea esi, [edi + 0xb4]
mov eax, esi
mov dword [ebp - 0x40], esi
jb 0x612cf3
mov eax, dword [esi]
mov dword [ebp - 0x40], eax
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileW]
cmp eax, 0xffffffff
jne 0x612d7a
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x24], eax
mov eax, dword [0x8076bc]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x612d2f
cmp byte [0x8076b8], 0
jne 0x612d3c
call fcn.006115c0
mov eax, dword [0x8076bc]
mov dword [ebp - 0x20], eax
mov esi, dword [eax]
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov esi, dword [esi + 0x24]
mov ecx, esi
push eax
push dword [ebp - 0x40]
push str.Failed_to_create_a_file_at__s._Error___d_
push 0x71a27c
push dword [ebp - 0x20]
call dword [0x707770]
call esi
mov eax, dword [ebp - 0x24]
add esp, 0x14
mov dword [edi + 0xd0], eax
mov dword [edi + 0xcc], 1
jmp 0x612d8d
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push esi
mov ecx, edi
call fcn.0061a720
test al, al
jne 0x612dc3
mov ecx, dword [0x8076bc]
test ecx, ecx
je 0x612da0
cmp byte [0x8076b8], 0
jne 0x612dab
call fcn.006115c0
mov ecx, dword [0x8076bc]
mov eax, dword [ecx]
push str.Failed_to_reset_the_aamd_file
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x707770]
call esi
add esp, 8
mov ecx, ebx
call fcn.00611c50
mov esi, eax
test esi, esi
je 0x612e0e
push 0x4c
push str.Failed_to_create_the_download_jobs_for_the_current_file._Some_unknown_error.
lea ecx, [ebx + 0x3b8]
mov dword [ebx + 0x3b0], 0xfffffff7
mov dword [ebx + 0x3d8], 2
call fcn.004271d0
mov ecx, ebx
call fcn.006138f0
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, esi
jmp 0x6132a3
mov byte [ebx + 0x266], 1
push 0x3c
call fcn.00650ded
add esp, 4
mov edi, eax
mov dword [ebp - 0x24], edi
push 0x3c
push 0
push edi
call fcn.00663090
add esp, 0xc
mov dword [edi], vtable.WorkerThread.0
lea eax, [edi + 0xc]
mov byte [edi + 4], 0
mov dword [edi + 0x24], 0
mov dword [edi + 0x28], 0
push eax
mov dword [edi + 0x34], 1
mov dword [edi + 0x38], 0
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
lea eax, [ebx + 0x70]
mov dword [ebx + 0x6c], edi
test eax, eax
je 0x613215
mov dword [edi + 0x2c], 1
mov dword [edi + 0x30], eax
mov byte [edi + 4], 1
mov edi, dword [ebx + 0x6c]
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x707770]
mov ecx, edi
call esi
test al, al
je 0x61328f
mov edi, dword [ebx + 0x6c]
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x707770]
mov ecx, edi
call esi
mov ecx, dword [0x8076bc]
test ecx, ecx
je 0x612ebf
cmp byte [0x8076b8], 0
jne 0x612eca
call fcn.006115c0
mov ecx, dword [0x8076bc]
mov eax, dword [ebx + 0x6c]
mov esi, dword [ecx]
push dword [eax + 0x38]
mov esi, dword [esi + 4]
push str.file_serializer_thread_id_is__d
push ecx
mov ecx, esi
call dword [0x707770]
call esi
mov edi, dword [ebx + 0x13c]
add esp, 0xc
mov dword [ebp - 0x20], edi
cmp dword [ebx + 0x574], edi
ja 0x612f02
mov edi, dword [ebx + 0x574]
mov dword [ebp - 0x20], edi
xor esi, esi
mov dword [ebx + 0x13c], edi
test edi, edi
je 0x612f30
lea eax, [ebx + 0x580]
mov ebx, eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], esi
push eax
mov ecx, ebx
call fcn.006152a0
inc esi
mov byte [eax + 0x1c], 0
cmp esi, edi
jb 0x612f16
mov ebx, dword [ebp - 0x14]
mov ecx, dword [0x8076bc]
test ecx, ecx
je 0x612f43
cmp byte [0x8076b8], 0
jne 0x612f4e
call fcn.006115c0
mov ecx, dword [0x8076bc]
mov eax, dword [ecx]
push edi
push str.Number_of_downloader_threads_are__d
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x707770]
call esi
add esp, 0xc
lea ecx, [ebx + 0x70]
push 0
push 0
push 6
call fcn.0061e310
lea esi, [ebx + 0x38]
mov ecx, esi
call fcn.0061a180
mov dword [ebp - 0x14], 0
mov al, 1
mov byte [ebp - 0x19], al
test edi, edi
je 0x613114
push 0x3c
call fcn.00650ded
add esp, 4
mov edi, eax
mov dword [ebp - 0x24], edi
push 0x3c
push 0
push edi
call fcn.00663090
add esp, 0xc
mov dword [edi], vtable.WorkerThread.0
lea eax, [edi + 0xc]
mov byte [edi + 4], 0
mov dword [edi + 0x24], 0
mov dword [edi + 0x28], 0
push eax
mov dword [edi + 0x34], 1
mov dword [edi + 0x38], 0
call dword [sym.imp.KERNEL32.DLL_InitializeCriticalSection]
push 0xa
call dword [sym.imp.KERNEL32.DLL_Sleep]
mov eax, dword [esi + 8]
test eax, eax
je 0x613039
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], eax
mov byte [edi + 4], 1
jmp 0x613078
push 0x4c
push str.Failed_to_create_the_download_jobs_for_the_current_file._Some_unknown_error.
lea ecx, [ebx + 0x3b8]
mov dword [ebx + 0x3b0], 0xfffffff7
mov dword [ebx + 0x3d8], 2
call fcn.004271d0
mov ecx, ebx
call fcn.006138f0
push edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, esi
jmp 0x6132a3
mov ecx, dword [0x8076bc]
test ecx, ecx
je 0x61304c
cmp byte [0x8076b8], 0
jne 0x613057
call fcn.006115c0
mov ecx, dword [0x8076bc]
mov eax, dword [ecx]
push str.WorkerThread::init_:_invalid_paramters
push 0x71a27c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x707770]
call esi
add esp, 0xc
mov byte [edi + 4], 0
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x707770]
mov ecx, edi
call esi
test al, al
je 0x6130c8
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebx + 0x64]
call fcn.006151c0
lea ecx, [ebx + 0x64]
mov dword [eax], edi
lea eax, [ebp - 0x14]
push eax
call fcn.006151c0
lea esi, [ebx + 0x38]
mov byte [eax + 4], 0
mov eax, dword [ebp - 0x14]
mov dword [edi + 0x38], eax
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp eax, dword [ebp - 0x20]
jb 0x612f93
lea esi, [ebx + 0x38]
jmp 0x613111
mov ecx, dword [0x8076bc]
test ecx, ecx
je 0x6130db
cmp byte [0x8076b8], 0
jne 0x6130e6
call fcn.006115c0
mov ecx, dword [0x8076bc]
mov eax, dword [ecx]
push str.Failed_to_create_a_new_worker_thead_.
push 0x71a27c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x707770]
call esi
add esp, 0xc
mov byte [ebp - 0x19], 0
lea esi, [ebx + 0x38]
mov ecx, esi
call fcn.0061a180
mov al, byte [ebp - 0x19]
mov byte [esi + 0x28], al
test al, al
jne 0x613155
mov ecx, dword [0x8076bc]
test ecx, ecx
je 0x61312d
cmp byte [0x8076b8], al
jne 0x613138
call fcn.006115c0
mov ecx, dword [0x8076bc]
mov eax, dword [ecx]
push str.failed_to_init_thread_pool
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x707770]
call esi
add esp, 8
jmp 0x61328f
cmp dword [ebx], 0
je 0x6131b0
mov ecx, dword [0x8076bc]
test ecx, ecx
je 0x61316d
cmp byte [0x8076b8], 0
jne 0x613178
call fcn.006115c0
mov ecx, dword [0x8076bc]
mov eax, dword [ecx]
push str.FileDownloadManager::runThisThread_thread_is_already_running._Closing_it_first
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x707770]
call esi
mov eax, dword [ebx]
add esp, 8
test eax, eax
je 0x6131b0
push 0x1388
push eax
call dword [sym.imp.KERNEL32.DLL_WaitForSingleObject]
push dword [ebx]
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov dword [ebx], 0
lea eax, [ebp - 0x18]
mov dword [ebx + 0x598], 4
push eax
push 0
push ebx
push 0x614aa0
push 0
push 0
mov dword [ebx + 0x3ac], 4
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov dword [ebx], eax
test eax, eax
jne 0x613204
mov ecx, dword [0x8076bc]
test ecx, ecx
je 0x6131f2
cmp byte [0x8076b8], al
jne 0x6131fd
call fcn.006115c0
mov ecx, dword [0x8076bc]
push str.FileDownloadManager::runThisThread:_failed_to_create_a_new_thread._Fatal_Error
jmp 0x613277
mov eax, dword [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
xor eax, eax
jmp 0x6132a3
mov ecx, dword [0x8076bc]
test ecx, ecx
je 0x613228
cmp byte [0x8076b8], 0
jne 0x613233
call fcn.006115c0
mov ecx, dword [0x8076bc]
mov eax, dword [ecx]
push str.WorkerThread::init_:_invalid_paramters
push 0x71a27c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x707770]
call esi
mov ecx, dword [0x8076bc]
add esp, 0xc
mov byte [edi + 4], 0
test ecx, ecx
je 0x613267
cmp byte [0x8076b8], 0
jne 0x613272
call fcn.006115c0
mov ecx, dword [0x8076bc]
push str.failed_to_init_file_serializer_thread
mov eax, dword [ecx]
push 0x71a27c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x707770]
call esi
add esp, 0xc
mov ecx, ebx
call fcn.006138f0
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
or eax, 0xffffffff
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.00650ddc
mov esp, ebp
pop ebp
ret