Function at 0x654d30
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x70a6e0
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x82f084]
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 [0x855a98]
test ecx, ecx
je 0x654d80
cmp byte [0x855a6a], 0
jne 0x654d8b
call fcn.00653890
mov ecx, dword [0x855a98]
mov eax, dword [ecx]
push str.Starting_download.
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x748368]
call esi
add esp, 8
lea ecx, [ebx + 0x590]
call fcn.00663800
cmp byte [ebx + 5], 0
jne 0x654e30
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.0042fe00
lea ecx, [ebx + 0x3b8]
mov dword [ebp - 4], 0
lea eax, [ebp - 0x3c]
mov dword [ebx + 0x3b0], 0xfffffff6
cmp ecx, eax
je 0x654e06
cmp dword [ebp - 0x28], 8
push dword [ebp - 0x2c]
cmovae eax, dword [ebp - 0x3c]
push eax
call fcn.0042fe00
lea ecx, [ebp - 0x3c]
mov dword [ebx + 0x3b4], 0
mov byte [ebx + 0x3d4], 1
call fcn.0042fd70
push edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, 0xfffffffc
jmp 0x655573
cmp dword [ebx + 0x598], 3
je 0x654ec2
cmp dword [ebx + 0x598], 5
je 0x654ec2
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.0042fe00
lea ecx, [ebx + 0x3b8]
mov dword [ebp - 4], 1
lea eax, [ebp - 0x3c]
mov dword [ebx + 0x3b0], 0xfffffff6
cmp ecx, eax
je 0x654e98
cmp dword [ebp - 0x28], 8
push dword [ebp - 0x2c]
cmovae eax, dword [ebp - 0x3c]
push eax
call fcn.0042fe00
lea ecx, [ebp - 0x3c]
mov dword [ebx + 0x3b4], 0
mov byte [ebx + 0x3d4], 1
call fcn.0042fd70
push edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, 0x1e
jmp 0x655573
lea ecx, [ebx + 0x70]
call fcn.0065f5d0
test al, al
jne 0x654f0e
mov ecx, dword [0x855a98]
test ecx, ecx
je 0x654ee0
cmp byte [0x855a6a], al
jne 0x654eeb
call fcn.00653890
mov ecx, dword [0x855a98]
mov eax, dword [ecx]
push str.failed_to_init_the_global_file_data_for_downloading
push 0x75c10c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x748368]
call esi
add esp, 0xc
push edi
jmp 0x65556a
cmp byte [ebx + 0x266], 0
mov ecx, ebx
je 0x654f20
call fcn.00653f20
jmp 0x654f25
call fcn.006542a0
mov esi, eax
test esi, esi
je 0x6550e5
cmp byte [ebx + 0x266], 0
jne 0x6552ce
cmp byte [ebx + 0x3e4], 0
lea edi, [ebx + 0x3e4]
je 0x654f9b
lea ecx, [edi + 4]
call fcn.00658cd0
test al, al
jne 0x654f98
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.0042fc50
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.00655f80
lea ecx, [ebp - 0x68]
call fcn.0042fd70
mov byte [edi], 0
mov ecx, edi
call fcn.0065ce80
test al, al
je 0x65505d
cmp dword [edi + 0xc8], 8
lea esi, [edi + 0xb4]
mov eax, esi
mov dword [ebp - 0x40], esi
jb 0x654fc3
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 0x65504a
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x24], eax
mov eax, dword [0x855a98]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x654fff
cmp byte [0x855a6a], 0
jne 0x65500c
call fcn.00653890
mov eax, dword [0x855a98]
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 0x75c10c
push dword [ebp - 0x20]
call dword [0x748368]
call esi
mov eax, dword [ebp - 0x24]
add esp, 0x14
mov dword [edi + 0xd0], eax
mov dword [edi + 0xcc], 1
jmp 0x65505d
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push esi
mov ecx, edi
call fcn.0065cb60
test al, al
jne 0x655093
mov ecx, dword [0x855a98]
test ecx, ecx
je 0x655070
cmp byte [0x855a6a], 0
jne 0x65507b
call fcn.00653890
mov ecx, dword [0x855a98]
mov eax, dword [ecx]
push str.Failed_to_reset_the_aamd_file
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x748368]
call esi
add esp, 8
mov ecx, ebx
call fcn.00653f20
mov esi, eax
test esi, esi
je 0x6550de
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.0042fe00
mov ecx, ebx
call fcn.00655bc0
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, esi
jmp 0x655573
mov byte [ebx + 0x266], 1
push 0x3c
call fcn.0067d662
add esp, 4
mov edi, eax
mov dword [ebp - 0x24], edi
push 0x3c
push 0
push edi
call fcn.00690450
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 0x6554e5
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 [0x748368]
mov ecx, edi
call esi
test al, al
je 0x65555f
mov edi, dword [ebx + 0x6c]
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x748368]
mov ecx, edi
call esi
mov ecx, dword [0x855a98]
test ecx, ecx
je 0x65518f
cmp byte [0x855a6a], 0
jne 0x65519a
call fcn.00653890
mov ecx, dword [0x855a98]
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 [0x748368]
call esi
mov edi, dword [ebx + 0x13c]
add esp, 0xc
mov dword [ebp - 0x20], edi
cmp dword [ebx + 0x574], edi
ja 0x6551d2
mov edi, dword [ebx + 0x574]
mov dword [ebp - 0x20], edi
xor esi, esi
mov dword [ebx + 0x13c], edi
test edi, edi
je 0x655200
lea eax, [ebx + 0x580]
mov ebx, eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], esi
push eax
mov ecx, ebx
call fcn.006576e0
inc esi
mov byte [eax + 0x1c], 0
cmp esi, edi
jb 0x6551e6
mov ebx, dword [ebp - 0x14]
mov ecx, dword [0x855a98]
test ecx, ecx
je 0x655213
cmp byte [0x855a6a], 0
jne 0x65521e
call fcn.00653890
mov ecx, dword [0x855a98]
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 [0x748368]
call esi
add esp, 0xc
lea ecx, [ebx + 0x70]
push 0
push 0
push 6
call fcn.00660750
lea esi, [ebx + 0x38]
mov ecx, esi
call fcn.0065c5c0
mov dword [ebp - 0x14], 0
mov al, 1
mov byte [ebp - 0x19], al
test edi, edi
je 0x6553e4
push 0x3c
call fcn.0067d662
add esp, 4
mov edi, eax
mov dword [ebp - 0x24], edi
push 0x3c
push 0
push edi
call fcn.00690450
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 0x655309
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], eax
mov byte [edi + 4], 1
jmp 0x655348
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.0042fe00
mov ecx, ebx
call fcn.00655bc0
push edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, esi
jmp 0x655573
mov ecx, dword [0x855a98]
test ecx, ecx
je 0x65531c
cmp byte [0x855a6a], 0
jne 0x655327
call fcn.00653890
mov ecx, dword [0x855a98]
mov eax, dword [ecx]
push str.WorkerThread::init_:_invalid_paramters
push 0x75c10c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x748368]
call esi
add esp, 0xc
mov byte [edi + 4], 0
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x748368]
mov ecx, edi
call esi
test al, al
je 0x655398
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebx + 0x64]
call fcn.00657600
lea ecx, [ebx + 0x64]
mov dword [eax], edi
lea eax, [ebp - 0x14]
push eax
call fcn.00657600
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 0x655263
lea esi, [ebx + 0x38]
jmp 0x6553e1
mov ecx, dword [0x855a98]
test ecx, ecx
je 0x6553ab
cmp byte [0x855a6a], 0
jne 0x6553b6
call fcn.00653890
mov ecx, dword [0x855a98]
mov eax, dword [ecx]
push str.Failed_to_create_a_new_worker_thead_.
push 0x75c10c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x748368]
call esi
add esp, 0xc
mov byte [ebp - 0x19], 0
lea esi, [ebx + 0x38]
mov ecx, esi
call fcn.0065c5c0
mov al, byte [ebp - 0x19]
mov byte [esi + 0x28], al
test al, al
jne 0x655425
mov ecx, dword [0x855a98]
test ecx, ecx
je 0x6553fd
cmp byte [0x855a6a], al
jne 0x655408
call fcn.00653890
mov ecx, dword [0x855a98]
mov eax, dword [ecx]
push str.failed_to_init_thread_pool
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x748368]
call esi
add esp, 8
jmp 0x65555f
cmp dword [ebx], 0
je 0x655480
mov ecx, dword [0x855a98]
test ecx, ecx
je 0x65543d
cmp byte [0x855a6a], 0
jne 0x655448
call fcn.00653890
mov ecx, dword [0x855a98]
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 [0x748368]
call esi
mov eax, dword [ebx]
add esp, 8
test eax, eax
je 0x655480
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 0x656d70
push 0
push 0
mov dword [ebx + 0x3ac], 4
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov dword [ebx], eax
test eax, eax
jne 0x6554d4
mov ecx, dword [0x855a98]
test ecx, ecx
je 0x6554c2
cmp byte [0x855a6a], al
jne 0x6554cd
call fcn.00653890
mov ecx, dword [0x855a98]
push str.FileDownloadManager::runThisThread:_failed_to_create_a_new_thread._Fatal_Error
jmp 0x655547
mov eax, dword [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
xor eax, eax
jmp 0x655573
mov ecx, dword [0x855a98]
test ecx, ecx
je 0x6554f8
cmp byte [0x855a6a], 0
jne 0x655503
call fcn.00653890
mov ecx, dword [0x855a98]
mov eax, dword [ecx]
push str.WorkerThread::init_:_invalid_paramters
push 0x75c10c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x748368]
call esi
mov ecx, dword [0x855a98]
add esp, 0xc
mov byte [edi + 4], 0
test ecx, ecx
je 0x655537
cmp byte [0x855a6a], 0
jne 0x655542
call fcn.00653890
mov ecx, dword [0x855a98]
push str.failed_to_init_file_serializer_thread
mov eax, dword [ecx]
push 0x75c10c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x748368]
call esi
add esp, 0xc
mov ecx, ebx
call fcn.00655bc0
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.0067d651
mov esp, ebp
pop ebp
ret