Function at 0x6a822e38
Capabilities:
Create thread

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x3c
mov ebx, dword [esp + 0x50]
mov dword [ebx + 0x29a2c], 0
mov dword [ebx + 0x29a30], 0
mov dword [ebx + 0x29a34], 0
mov eax, dword [ebx + 0x1b958]
cmp eax, 1
jle 0x6a8230ea
mov ebp, dword [ebx + 0x1c7b4]
cmp ebp, 1
jle 0x6a8230ea
cmp eax, ebp
jl 0x6a8230f4
dec ebp
mov dword [esp + 0x28], ebp
mov eax, dword [ebx + 0x19efc]
cdq
idiv dword [ebx + 0x29a28]
cmp dword [esp + 0x28], eax
jge 0x6a823100
mov esi, dword [esp + 0x28]
shl esi, 2
mov dword [esp], esi
call fcn.6a7fb404
mov dword [ebx + 0x29a38], eax
test eax, eax
je 0x6a823113
mov dword [esp], esi
call fcn.6a7fb404
mov dword [ebx + 0x29a50], eax
test eax, eax
je 0x6a823136
mov edx, dword [esp + 0x28]
lea eax, [edx + edx*8]
shl eax, 3
sub eax, edx
lea esi, [edx + eax*4]
shl esi, 7
mov dword [esp + 4], esi
mov dword [esp], 0x20
call fcn.6a7fb3d0
mov edx, eax
mov dword [ebx + 0x29a40], eax
test eax, eax
je 0x6a823159
xor eax, eax
mov edi, edx
mov ecx, esi
rep stosb byte es:[edi], al
mov edx, dword [esp + 0x28]
lea eax, [edx + edx*2]
shl eax, 2
mov dword [esp], eax
call fcn.6a7fb404
mov dword [ebx + 0x29a44], eax
test eax, eax
je 0x6a823182
mov eax, dword [ebx + 0x19ef8]
shl eax, 2
mov dword [esp], eax
call fcn.6a7fb404
mov dword [ebx + 0x29a24], eax
test eax, eax
je 0x6a8231a5
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.KERNEL32.dll_CreateSemaphoreA
sub esp, 0x10
mov dword [ebx + 0x29a54], eax
mov dword [ebx + 0x29a2c], 1
mov eax, dword [esp + 0x28]
mov dword [ebx + 0x29a30], eax
test eax, eax
jle 0x6a82304e
mov dword [esp + 0x24], 0
xor esi, esi
nop
lea edx, [esi + esi*2]
mov eax, dword [ebx + 0x29a44]
lea edi, [eax + edx*4]
lea ebp, [esi*4]
mov edx, dword [ebx + 0x29a50]
add edx, ebp
mov dword [esp + 0x2c], edx
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.KERNEL32.dll_CreateSemaphoreA
sub esp, 0x10
mov edx, dword [esp + 0x2c]
mov dword [edx], eax
mov dword [edi], esi
mov dword [edi + 4], ebx
mov eax, dword [esp + 0x24]
add eax, dword [ebx + 0x29a40]
mov dword [edi + 8], eax
add ebp, dword [ebx + 0x29a38]
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x6a822174
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.msvcrt.dll__beginthreadex
mov dword [ebp], eax
inc esi
add dword [esp + 0x24], 0x8e80
cmp esi, dword [esp + 0x28]
jne 0x6a822fa4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.KERNEL32.dll_CreateSemaphoreA
sub esp, 0x10
mov dword [ebx + 0x29a58], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x8000
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.KERNEL32.dll_CreateSemaphoreA
sub esp, 0x10
mov dword [ebx + 0x29a5c], eax
mov dword [ebx + 0x29a4c], ebx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
lea eax, [ebx + 0x29a48]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x6a8220f0
mov dword [esp + 4], 0
mov dword [esp], 0
call sub.msvcrt.dll__beginthreadex
mov dword [ebx + 0x29a3c], eax
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
dec eax
mov dword [esp + 0x28], eax
jmp 0x6a822e8c
dec eax
mov dword [esp + 0x28], eax
jne 0x6a822ea3
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp + 8], str.Failed_to_allocate_cpi__h_encoding_thread
mov dword [esp + 4], 2
lea eax, [ebx + 0x19660]
mov dword [esp], eax
call fcn.6a822800
jmp 0x6a822ec0
mov dword [esp + 8], str.Failed_to_allocate_cpi__h_event_start_encoding
mov dword [esp + 4], 2
lea eax, [ebx + 0x19660]
mov dword [esp], eax
call fcn.6a822800
jmp 0x6a822ed6
mov dword [esp + 8], str.Failed_to_allocate_cpi__mb_row_ei
mov dword [esp + 4], 2
lea eax, [ebx + 0x19660]
mov dword [esp], eax
call fcn.6a822800
mov edx, dword [ebx + 0x29a40]
jmp 0x6a822f08
mov dword [esp + 8], str.Failed_to_allocate_cpi__en_thread_data
mov dword [esp + 4], 2
lea eax, [ebx + 0x19660]
mov dword [esp], eax
call fcn.6a822800
jmp 0x6a822f30
mov dword [esp + 8], str.Failed_to_allocate_cpi__mt_current_mb_col
mov dword [esp + 4], 2
lea eax, [ebx + 0x19660]
mov dword [esp], eax
call fcn.6a822800
jmp 0x6a822f4f