Function at 0x6532f0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x7088b0
mov eax, dword fs:[0]
push eax
sub esp, 0x6c
mov eax, dword [0x82d084]
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 [0x853a98]
test ecx, ecx
je 0x653340
cmp byte [0x853a6a], 0
jne 0x65334b
call fcn.00651e50
mov ecx, dword [0x853a98]
mov eax, dword [ecx]
push str.Starting_download.
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x747368]
call esi
add esp, 8
lea ecx, [ebx + 0x590]
call fcn.00661c50
cmp byte [ebx + 5], 0
jne 0x6533f0
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 0x6533c6
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 0x653b33
cmp dword [ebx + 0x598], 3
je 0x653482
cmp dword [ebx + 0x598], 5
je 0x653482
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 0x653458
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 0x653b33
lea ecx, [ebx + 0x70]
call fcn.0065da30
test al, al
jne 0x6534ce
mov ecx, dword [0x853a98]
test ecx, ecx
je 0x6534a0
cmp byte [0x853a6a], al
jne 0x6534ab
call fcn.00651e50
mov ecx, dword [0x853a98]
mov eax, dword [ecx]
push str.failed_to_init_the_global_file_data_for_downloading
push 0x75b10c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x747368]
call esi
add esp, 0xc
push edi
jmp 0x653b2a
cmp byte [ebx + 0x266], 0
mov ecx, ebx
je 0x6534e0
call fcn.006524e0
jmp 0x6534e5
call fcn.00652860
mov esi, eax
test esi, esi
je 0x6536a5
cmp byte [ebx + 0x266], 0
jne 0x65388e
cmp byte [ebx + 0x3e4], 0
lea edi, [ebx + 0x3e4]
je 0x65355b
lea ecx, [edi + 4]
call fcn.00657120
test al, al
jne 0x653558
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.00654540
lea ecx, [ebp - 0x68]
call fcn.0042fd70
mov byte [edi], 0
mov ecx, edi
call fcn.0065b2d0
test al, al
je 0x65361d
cmp dword [edi + 0xc8], 8
lea esi, [edi + 0xb4]
mov eax, esi
mov dword [ebp - 0x40], esi
jb 0x653583
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 0x65360a
call dword [sym.imp.KERNEL32.DLL_GetLastError]
mov dword [ebp - 0x24], eax
mov eax, dword [0x853a98]
mov dword [ebp - 0x20], eax
test eax, eax
je 0x6535bf
cmp byte [0x853a6a], 0
jne 0x6535cc
call fcn.00651e50
mov eax, dword [0x853a98]
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 0x75b10c
push dword [ebp - 0x20]
call dword [0x747368]
call esi
mov eax, dword [ebp - 0x24]
add esp, 0x14
mov dword [edi + 0xd0], eax
mov dword [edi + 0xcc], 1
jmp 0x65361d
push eax
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
push esi
mov ecx, edi
call fcn.0065afb0
test al, al
jne 0x653653
mov ecx, dword [0x853a98]
test ecx, ecx
je 0x653630
cmp byte [0x853a6a], 0
jne 0x65363b
call fcn.00651e50
mov ecx, dword [0x853a98]
mov eax, dword [ecx]
push str.Failed_to_reset_the_aamd_file
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x747368]
call esi
add esp, 8
mov ecx, ebx
call fcn.006524e0
mov esi, eax
test esi, esi
je 0x65369e
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.00654180
lea eax, [ebx + 0xc]
push eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, esi
jmp 0x653b33
mov byte [ebx + 0x266], 1
push 0x3c
call fcn.0067ba12
add esp, 4
mov edi, eax
mov dword [ebp - 0x24], edi
push 0x3c
push 0
push edi
call fcn.0068e800
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 0x653aa5
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 [0x747368]
mov ecx, edi
call esi
test al, al
je 0x653b1f
mov edi, dword [ebx + 0x6c]
mov eax, dword [edi]
mov esi, dword [eax + 8]
mov ecx, esi
call dword [0x747368]
mov ecx, edi
call esi
mov ecx, dword [0x853a98]
test ecx, ecx
je 0x65374f
cmp byte [0x853a6a], 0
jne 0x65375a
call fcn.00651e50
mov ecx, dword [0x853a98]
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 [0x747368]
call esi
mov edi, dword [ebx + 0x13c]
add esp, 0xc
mov dword [ebp - 0x20], edi
cmp dword [ebx + 0x574], edi
ja 0x653792
mov edi, dword [ebx + 0x574]
mov dword [ebp - 0x20], edi
xor esi, esi
mov dword [ebx + 0x13c], edi
test edi, edi
je 0x6537c0
lea eax, [ebx + 0x580]
mov ebx, eax
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], esi
push eax
mov ecx, ebx
call fcn.00655b30
inc esi
mov byte [eax + 0x1c], 0
cmp esi, edi
jb 0x6537a6
mov ebx, dword [ebp - 0x14]
mov ecx, dword [0x853a98]
test ecx, ecx
je 0x6537d3
cmp byte [0x853a6a], 0
jne 0x6537de
call fcn.00651e50
mov ecx, dword [0x853a98]
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 [0x747368]
call esi
add esp, 0xc
lea ecx, [ebx + 0x70]
push 0
push 0
push 6
call fcn.0065ebb0
lea esi, [ebx + 0x38]
mov ecx, esi
call fcn.0065aa10
mov dword [ebp - 0x14], 0
mov al, 1
mov byte [ebp - 0x19], al
test edi, edi
je 0x6539a4
push 0x3c
call fcn.0067ba12
add esp, 4
mov edi, eax
mov dword [ebp - 0x24], edi
push 0x3c
push 0
push edi
call fcn.0068e800
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 0x6538c9
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], eax
mov byte [edi + 4], 1
jmp 0x653908
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.00654180
push edi
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
mov eax, esi
jmp 0x653b33
mov ecx, dword [0x853a98]
test ecx, ecx
je 0x6538dc
cmp byte [0x853a6a], 0
jne 0x6538e7
call fcn.00651e50
mov ecx, dword [0x853a98]
mov eax, dword [ecx]
push str.WorkerThread::init_:_invalid_paramters
push 0x75b10c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x747368]
call esi
add esp, 0xc
mov byte [edi + 4], 0
mov eax, dword [edi]
mov esi, dword [eax]
mov ecx, esi
call dword [0x747368]
mov ecx, edi
call esi
test al, al
je 0x653958
lea eax, [ebp - 0x14]
push eax
lea ecx, [ebx + 0x64]
call fcn.00655a50
lea ecx, [ebx + 0x64]
mov dword [eax], edi
lea eax, [ebp - 0x14]
push eax
call fcn.00655a50
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 0x653823
lea esi, [ebx + 0x38]
jmp 0x6539a1
mov ecx, dword [0x853a98]
test ecx, ecx
je 0x65396b
cmp byte [0x853a6a], 0
jne 0x653976
call fcn.00651e50
mov ecx, dword [0x853a98]
mov eax, dword [ecx]
push str.Failed_to_create_a_new_worker_thead_.
push 0x75b10c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x747368]
call esi
add esp, 0xc
mov byte [ebp - 0x19], 0
lea esi, [ebx + 0x38]
mov ecx, esi
call fcn.0065aa10
mov al, byte [ebp - 0x19]
mov byte [esi + 0x28], al
test al, al
jne 0x6539e5
mov ecx, dword [0x853a98]
test ecx, ecx
je 0x6539bd
cmp byte [0x853a6a], al
jne 0x6539c8
call fcn.00651e50
mov ecx, dword [0x853a98]
mov eax, dword [ecx]
push str.failed_to_init_thread_pool
push ecx
mov esi, dword [eax + 4]
mov ecx, esi
call dword [0x747368]
call esi
add esp, 8
jmp 0x653b1f
cmp dword [ebx], 0
je 0x653a40
mov ecx, dword [0x853a98]
test ecx, ecx
je 0x6539fd
cmp byte [0x853a6a], 0
jne 0x653a08
call fcn.00651e50
mov ecx, dword [0x853a98]
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 [0x747368]
call esi
mov eax, dword [ebx]
add esp, 8
test eax, eax
je 0x653a40
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 0x655330
push 0
push 0
mov dword [ebx + 0x3ac], 4
call dword [sym.imp.KERNEL32.DLL_CreateThread]
mov dword [ebx], eax
test eax, eax
jne 0x653a94
mov ecx, dword [0x853a98]
test ecx, ecx
je 0x653a82
cmp byte [0x853a6a], al
jne 0x653a8d
call fcn.00651e50
mov ecx, dword [0x853a98]
push str.FileDownloadManager::runThisThread:_failed_to_create_a_new_thread._Fatal_Error
jmp 0x653b07
mov eax, dword [ebp - 0x48]
push eax
call dword [sym.imp.KERNEL32.DLL_LeaveCriticalSection]
xor eax, eax
jmp 0x653b33
mov ecx, dword [0x853a98]
test ecx, ecx
je 0x653ab8
cmp byte [0x853a6a], 0
jne 0x653ac3
call fcn.00651e50
mov ecx, dword [0x853a98]
mov eax, dword [ecx]
push str.WorkerThread::init_:_invalid_paramters
push 0x75b10c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x747368]
call esi
mov ecx, dword [0x853a98]
add esp, 0xc
mov byte [edi + 4], 0
test ecx, ecx
je 0x653af7
cmp byte [0x853a6a], 0
jne 0x653b02
call fcn.00651e50
mov ecx, dword [0x853a98]
push str.failed_to_init_file_serializer_thread
mov eax, dword [ecx]
push 0x75b10c
push ecx
mov esi, dword [eax + 0x24]
mov ecx, esi
call dword [0x747368]
call esi
add esp, 0xc
mov ecx, ebx
call fcn.00654180
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.0067ba01
mov esp, ebp
pop ebp
ret