Function at 0x408590
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x63751b
mov eax, dword fs:[0]
push eax
sub esp, 0x1c
push ebx
push esi
push edi
mov eax, dword [0x6eed24]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov ebx, ecx
xor esi, esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x14], esi
mov edi, dword [ebp + 0xc]
lea ecx, [ebp - 0x28]
push 0xffffffffffffffff
push edi
mov dword [ebp - 4], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
mov dword [ebp - 0x20], esi
call fcn.00403940
lea eax, [ebp - 0x1c]
mov byte [ebp - 4], 1
push eax
lea eax, [ebp - 0x28]
mov ecx, 0x6f50d0
push eax
call fcn.00441530
test eax, eax
sete byte [ebp + 0xf]
mov eax, dword [ebp - 0x28]
mov byte [ebp - 4], 2
test eax, eax
je 0x40860f
push eax
call fcn.00446420
add esp, 4
cmp byte [ebp + 0xf], 0
mov byte [ebp - 4], 0
je 0x40863d
push dword [ebp + 8]
push edi
push 0x64a080
push 3
push 0x2f
push str.e:workprgpdf5_builds_rc.328_trackerupdatedownloadmanager.cpp
call fcn.00431810
add esp, 0x18
mov esi, 0x8200000f
jmp 0x408774
push 0x48
call fcn.004463f0
add esp, 4
mov dword [ebp + 0xc], eax
mov byte [ebp - 4], 3
test eax, eax
je 0x40865d
mov ecx, eax
call fcn.00408050
mov edi, eax
jmp 0x40865f
xor edi, edi
mov byte [ebp - 4], 0
mov dword [ebp + 0xc], edi
test edi, edi
jne 0x40868f
push str.Cannot_allocate_memory
push 0x8007000e
push 1
push 0x36
push str.e:workprgpdf5_builds_rc.328_trackerupdatedownloadmanager.cpp
call fcn.00431620
add esp, 0x14
mov esi, 0x8007000e
jmp 0x408774
mov eax, dword [ebp - 0x1c]
lea ecx, [edi + 0xc]
test eax, eax
jne 0x40869e
mov eax, 0x649aa0
push dword [ebp - 0x18]
push eax
call fcn.00403940
push 0xffffffffffffffff
push dword [ebp + 8]
mov ecx, edi
call fcn.00403940
mov eax, dword [ebp + 0x10]
mov dword [edi + 0x18], eax
mov eax, dword [ebp + 0x14]
mov ecx, dword [edi + 0x1c]
mov edx, dword [eax]
mov dword [ebp + 8], edx
cmp ecx, edx
je 0x4086f1
mov byte [ebp - 4], 4
test edx, edx
je 0x4086dc
mov eax, dword [edx]
push edx
call dword [eax + 4]
mov ecx, dword [edi + 0x1c]
mov edx, dword [ebp + 8]
mov dword [edi + 0x1c], edx
mov byte [ebp - 4], 5
test ecx, ecx
je 0x4086ed
mov eax, dword [ecx]
push ecx
call dword [eax + 8]
mov byte [ebp - 4], 0
mov al, byte [ebp + 0x18]
mov byte [edi + 0x21], al
mov al, byte [ebp + 0x1c]
mov byte [edi + 0x22], al
mov eax, dword [ebp + 0x20]
test eax, eax
je 0x408712
add edi, 0x28
mov ecx, 8
mov esi, eax
rep movsd dword es:[edi], dword [esi]
xor esi, esi
lea edi, [ebx + 0xc]
push edi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
lea eax, [ebp + 0xc]
mov ecx, ebx
push eax
call fcn.00409a60
cmp dword [ebx + 0x24], 0xffffffff
jne 0x40876d
cmp dword [ebx + 0x28], 0xffffffff
jne 0x408744
push 0
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateEventW]
mov dword [ebx + 0x28], eax
lea eax, [ebp - 0x10]
push eax
push 0
push ebx
push 0x409a40
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov dword [ebx + 0x24], eax
test eax, eax
jne 0x40876d
mov dword [ebx + 0x24], 0xffffffff
mov esi, 0x8200000e
push edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 4], 6
test eax, eax
je 0x40878b
push eax
call fcn.00446420
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x1c