Function at 0x4a47b0
Capabilities:
Create thread

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x4c
mov dword [esp], str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov ebx, dword [sym.imp.KERNEL32.dll_GetProcAddress]
sub esp, 4
mov esi, eax
mov dword [esp + 4], str.InitializeConditionVariable
mov dword [esp], eax
call ebx
sub esp, 8
mov dword [0x61500c], eax
mov dword [esp + 4], str.WakeAllConditionVariable
mov dword [esp], esi
call ebx
sub esp, 8
mov dword [0x615008], eax
mov dword [esp + 4], str.WakeConditionVariable
mov dword [esp], esi
call ebx
sub esp, 8
mov dword [0x615000], eax
mov dword [esp + 4], str.SleepConditionVariableCS
mov dword [esp], esi
call ebx
xor ecx, ecx
sub esp, 8
mov edx, dword [esp + 0x60]
mov dword [0x615004], eax
mov eax, dword [edx + 0xc]
mov eax, dword [eax + 0x10]
test ah, 0x10
je 0x4a4841
test dword [edx + 0x58], 0x90000
je 0x4a4aa4
mov ebx, dword [esp + 0x60]
mov edx, dword [ebx + 0x328]
cmp edx, 1
je 0x4a4ac0
test ecx, ecx
je 0x4a4a40
mov esi, dword [esp + 0x60]
test byte [esi + 0x32c], 1
je 0x4a4a40
mov dword [esi + 0x330], 1
cmp edx, 0x10
jle 0x4a4a66
mov eax, dword [esp + 0x60]
mov dword [esp + 0xc], edx
mov dword [esp + 0x10], 0x10
mov dword [esp + 8], str.Application_has_requested__d_threads._Using_a_thread_count_greater_than__d_is_not_recommended._n
mov dword [esp], eax
mov dword [esp + 4], 0x18
call fcn.00539bd0
mov edx, dword [esp + 0x60]
mov eax, dword [edx + 0x330]
test al, 2
je 0x4a4a78
mov esi, dword [edx + 0x328]
test esi, esi
je 0x4a4d91
cmp esi, 1
jle 0x4a4d77
mov dword [esp], 0x60
call fcn.00537640
test eax, eax
mov ebx, eax
je 0x4a51c5
mov eax, esi
shl eax, 4
mov dword [esp], eax
call fcn.00537640
test eax, eax
mov dword [ebx], eax
je 0x4a51cf
mov eax, dword [esp + 0x60]
mov dword [eax + 0x340], ebx
mov eax, dword [0x61500c]
mov dword [ebx + 0x44], 0
mov dword [ebx + 0x18], 0
mov dword [ebx + 0x1c], 0
test eax, eax
mov dword [ebx + 0x48], 0
je 0x4a5120
lea edx, [ebx + 0x24]
mov dword [esp], edx
call eax
mov edx, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
sub esp, 4
mov dword [esp + 0x2c], edx
mov eax, dword [0x61500c]
lea edx, [ebx + 0x20]
mov dword [esp + 0x30], edx
test eax, eax
je 0x4a5080
mov dword [esp], edx
call eax
sub esp, 4
lea ecx, [ebx + 0x28]
xor ebp, ebp
mov dword [esp + 0x28], ecx
mov dword [esp], ecx
call dword [esp + 0x2c]
sub esp, 4
mov ecx, dword [esp + 0x28]
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
sub esp, 4
mov dword [esp + 0x24], esi
mov esi, dword [esp + 0x60]
lea esi, [esi]
mov edi, ebp
shl edi, 4
add edi, dword [ebx]
mov dword [edi + 4], 0x4a2ac0
mov dword [edi + 8], esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], edi
mov dword [esp + 8], 0x4a2710
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
test eax, eax
mov dword [edi], eax
je 0x4a4fe0
add ebp, 1
cmp ebp, dword [esp + 0x24]
jl 0x4a4990
mov esi, dword [esp + 0x24]
mov eax, dword [ebx + 0x18]
add eax, esi
cmp dword [ebx + 0x44], eax
je 0x4a4a13
mov edi, dword [esp + 0x30]
mov ebp, dword [esp + 0x28]
nop
lea esi, [esi]
mov edx, ebp
mov eax, edi
call fcn.004a28e0
mov eax, dword [ebx + 0x18]
add eax, esi
cmp dword [ebx + 0x44], eax
jne 0x4a4a00
mov ecx, dword [esp + 0x28]
xor esi, esi
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
mov eax, dword [esp + 0x60]
mov dword [eax + 0x338], fcn.004a2d40
mov dword [eax + 0x33c], 0x4a2e70
jmp 0x4a4a7e
test ah, 0x20
jne 0x4a4a88
test ah, 0x80
jne 0x4a4877
mov eax, dword [esp + 0x60]
mov dword [eax + 0x328], 1
mov dword [eax + 0x330], 0
mov edx, dword [esp + 0x60]
mov eax, dword [edx + 0x330]
test al, 2
jne 0x4a48ba
xor esi, esi
test al, 1
jne 0x4a4ad0
add esp, 0x4c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
mov ecx, dword [esp + 0x60]
test byte [ecx + 0x32c], 2
je 0x4a4a45
mov dword [ecx + 0x330], 2
jmp 0x4a4877
mov ebx, dword [esp + 0x60]
xor ecx, ecx
test byte [edx + 0x5d], 0x80
mov edx, dword [ebx + 0x328]
sete cl
cmp edx, 1
jne 0x4a4854
mov dword [ebx + 0x330], 0
jmp 0x4a4a66
mov eax, dword [esp + 0x60]
mov eax, dword [eax + 0x328]
mov dword [esp + 0x3c], eax
mov eax, dword [esp + 0x60]
mov esi, dword [esp + 0x3c]
mov eax, dword [eax + 0xc]
test esi, esi
mov dword [esp + 0x38], eax
je 0x4a4d50
cmp dword [esp + 0x3c], 1
jle 0x4a4d77
imul ebx, dword [esp + 0x3c], 0x2a8
mov dword [esp], 0x30
call fcn.00537640
mov edx, dword [esp + 0x60]
mov dword [edx + 0x340], eax
mov dword [esp + 0x30], eax
mov dword [esp], ebx
call fcn.00537640
mov ecx, dword [esp + 0x30]
mov ebx, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [esp + 0x2c], ebx
mov dword [ecx], eax
mov eax, ecx
add eax, 8
mov dword [esp], eax
call ebx
sub esp, 4
mov eax, dword [esp + 0x30]
mov dword [esp + 0x34], 0
mov dword [esp + 0x24], 0
mov dword [eax + 0x28], 1
mov eax, dword [esp + 0x60]
mov dword [esp + 0x28], eax
jmp 0x4a4c15
mov edx, dword [esp + 0x38]
mov esi, dword [esp + 0x34]
mov eax, dword [edx + 0x4c]
test eax, eax
je 0x4a4b86
mov dword [esp], ebp
call eax
mov esi, eax
mov eax, dword [esp + 0x60]
mov ecx, 1
mov edx, ebp
call fcn.004a2740
mov dword [esp + 0x28], ebp
test esi, esi
jne 0x4a4fc5
lea eax, [ebx + 4]
mov dword [ebx + 8], 0x4a3050
mov dword [ebx + 0xc], ebx
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x4a2710
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll__beginthreadex]
test eax, eax
mov dword [ebx + 4], eax
sete al
movzx eax, al
neg eax
mov dword [esp + 0x34], eax
sete al
movzx eax, al
test eax, eax
mov dword [ebx + 0x14], eax
je 0x4a5075
add dword [esp + 0x24], 1
mov ebx, dword [esp + 0x3c]
cmp dword [esp + 0x24], ebx
jge 0x4a4a7e
mov dword [esp], 0x3b8
call fcn.00537120
imul ebx, dword [esp + 0x24], 0x2a8
mov ebp, eax
mov eax, dword [esp + 0x30]
add ebx, dword [eax]
lea eax, [ebx + 0x24]
mov dword [esp], eax
call dword [esp + 0x2c]
lea eax, [ebx + 0x3c]
sub esp, 4
mov dword [esp], eax
call dword [esp + 0x2c]
mov eax, dword [0x61500c]
sub esp, 4
test eax, eax
je 0x4a4dd4
lea edx, [ebx + 0x18]
mov dword [esp], edx
call eax
sub esp, 4
mov eax, dword [0x61500c]
test eax, eax
je 0x4a4e77
lea edx, [ebx + 0x1c]
mov dword [esp], edx
call eax
sub esp, 4
mov eax, dword [0x61500c]
test eax, eax
je 0x4a4f20
lea edx, [ebx + 0x20]
mov dword [esp], edx
call eax
sub esp, 4
mov eax, dword [esp + 0x30]
test ebp, ebp
mov dword [ebx + 0x54], ebp
mov dword [ebx], eax
je 0x4a4fc0
mov esi, dword [esp + 0x28]
mov ecx, 0xee
mov edi, ebp
rep movsd dword es:[edi], dword [esi]
lea eax, [ebx + 0x58]
mov dword [ebp + 0x340], ebx
mov dword [ebp + 0x368], eax
mov ecx, dword [esp + 0x24]
test ecx, ecx
je 0x4a4b70
mov ecx, dword [esp + 0x38]
mov eax, dword [ecx + 0x34]
mov dword [esp], eax
call fcn.00537120
test eax, eax
mov dword [ebp + 0x3c], eax
je 0x4a4fc0
mov esi, dword [esp + 0x28]
mov edx, dword [esi + 0x3c]
mov esi, dword [esp + 0x38]
mov ecx, dword [esi + 0x34]
mov dword [esp + 4], edx
mov dword [esp], eax
mov dword [esp + 8], ecx
call sub.msvcrt.dll_memcpy
mov dword [esp], 0x200
call fcn.00537120
test eax, eax
mov dword [ebp + 0x40], eax
je 0x4a4fc0
mov edx, dword [esp + 0x28]
mov edi, eax
mov ecx, pe_nt_image_headers32
mov esi, dword [edx + 0x40]
rep movsd dword es:[edi], dword [esi]
mov dword [eax], 1
mov ecx, dword [esp + 0x38]
mov esi, dword [esp + 0x34]
mov eax, dword [ecx + 0x3c]
test eax, eax
je 0x4a4b9a
mov dword [esp], ebp
call eax
mov esi, eax
jmp 0x4a4b9a
call fcn.005492e0
mov edx, dword [esp + 0x60]
test dword [edx + 0x2b0], 0x6000
je 0x4a5016
mov eax, dword [esp + 0x60]
mov dword [eax + 0x328], 1
mov eax, dword [esp + 0x60]
xor esi, esi
mov dword [eax + 0x330], 0
add esp, 0x4c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.005492e0
mov ecx, dword [esp + 0x60]
mov edx, dword [ecx + 0x7c]
test edx, edx
je 0x4a4db2
lea ecx, [edx + 0x1e]
add edx, 0xf
cmovs edx, ecx
sar edx, 4
cmp eax, edx
cmovg eax, edx
cmp eax, 1
jle 0x4a4d69
lea edx, [eax + 1]
cmp eax, 0xf
mov eax, dword [esp + 0x60]
mov esi, 0x10
cmovle esi, edx
mov dword [eax + 0x328], esi
jmp 0x4a48d1
mov dword [esp], 0x40
call fcn.00537640
test eax, eax
mov esi, eax
je 0x4a4c63
mov dword [ebx + 0x18], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x7fffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
sub esp, 0x10
test eax, eax
mov dword [esi + 0x34], eax
je 0x4a4c63
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
test eax, eax
mov dword [esi + 0x38], eax
je 0x4a4c63
lea eax, [esi + 0x18]
mov dword [esp], eax
call dword [esp + 0x2c]
sub esp, 4
mov dword [esp], esi
call dword [esp + 0x2c]
mov eax, dword [0x61500c]
sub esp, 4
test eax, eax
jne 0x4a4c70
mov dword [esp], 0x40
call fcn.00537640
test eax, eax
mov esi, eax
je 0x4a4c7b
mov dword [ebx + 0x1c], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x7fffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
sub esp, 0x10
test eax, eax
mov dword [esi + 0x34], eax
je 0x4a4c7b
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
test eax, eax
mov dword [esi + 0x38], eax
je 0x4a4c7b
lea eax, [esi + 0x18]
mov dword [esp], eax
call dword [esp + 0x2c]
sub esp, 4
mov dword [esp], esi
call dword [esp + 0x2c]
mov eax, dword [0x61500c]
sub esp, 4
test eax, eax
jne 0x4a4c88
lea esi, [esi]
mov dword [esp], 0x40
call fcn.00537640
test eax, eax
mov esi, eax
je 0x4a4c93
mov dword [ebx + 0x20], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x7fffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
sub esp, 0x10
test eax, eax
mov dword [esi + 0x34], eax
je 0x4a4c93
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
test eax, eax
mov dword [esi + 0x38], eax
je 0x4a4c93
lea eax, [esi + 0x18]
mov dword [esp], eax
call dword [esp + 0x2c]
sub esp, 4
mov dword [esp], esi
call dword [esp + 0x2c]
sub esp, 4
jmp 0x4a4c93
mov esi, 0xfffffff4
mov edx, dword [esp + 0x24]
mov eax, dword [esp + 0x60]
add edx, 1
call fcn.004a32b0
add esp, 0x4c
mov eax, esi
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, dword [esp + 0x60]
mov ecx, dword [esp + 0x28]
mov dword [eax + 0x328], ebp
mov dword [esp], ecx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
sub esp, 4
mov eax, dword [esp + 0x60]
test byte [eax + 0x330], 1
jne 0x4a5060
call fcn.004a2ec0
mov esi, 0xffffffff
jmp 0x4a4a7e
mov ebx, dword [edx + 0x2b4]
test ebx, ebx
jne 0x4a4d69
cmp eax, 1
jle 0x4a4d69
cmp eax, 0xf
mov ebx, 0x2a80
mov dword [esp + 0x3c], 0x10
jg 0x4a504c
add eax, 1
imul ebx, eax, 0x2a8
mov dword [esp + 0x3c], eax
mov edx, dword [esp + 0x3c]
mov eax, dword [esp + 0x60]
mov dword [eax + 0x328], edx
jmp 0x4a4b08
mov edx, dword [eax + 0x328]
mov esi, 0xffffffff
call fcn.004a32b0
jmp 0x4a4a7e
mov esi, dword [esp + 0x34]
jmp 0x4a4fc5
mov dword [esp], 0x40
call fcn.00537640
test eax, eax
mov edi, eax
je 0x4a4962
mov dword [ebx + 0x20], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x7fffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
sub esp, 0x10
test eax, eax
mov dword [edi + 0x34], eax
je 0x4a4962
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
test eax, eax
mov dword [edi + 0x38], eax
je 0x4a4962
lea eax, [edi + 0x18]
mov dword [esp], eax
call dword [esp + 0x2c]
sub esp, 4
mov dword [esp], edi
call dword [esp + 0x2c]
sub esp, 4
jmp 0x4a4962
mov dword [esp], 0x40
call fcn.00537640
mov ecx, dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
mov dword [esp + 0x2c], ecx
test eax, eax
mov edi, eax
je 0x4a4946
mov dword [ebx + 0x24], eax
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0x7fffffff
mov dword [esp + 4], 0
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreA]
sub esp, 0x10
test eax, eax
mov dword [edi + 0x34], eax
je 0x4a4946
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 1
mov dword [esp], 0
call dword [sym.imp.KERNEL32.dll_CreateEventA]
sub esp, 0x10
test eax, eax
mov dword [edi + 0x38], eax
je 0x4a4946
lea eax, [edi + 0x18]
mov dword [esp], eax
call dword [esp + 0x2c]
sub esp, 4
mov dword [esp], edi
call dword [esp + 0x2c]
sub esp, 4
jmp 0x4a4946
mov esi, 0xffffffff
jmp 0x4a4a7e
mov dword [esp], ebx
mov esi, 0xffffffff
call fcn.005374e0
jmp 0x4a4a7e