Function at 0x495e10
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x2c
push ebx
push esi
push edi
mov edi, ecx
mov dword [ebp - 0x10], edi
cmp dword [edi + 8], 0
jne 0x495e30
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [edi + 0x408], 1
je 0x496178
mov eax, dword [edi + 0x4f4]
mov dword [ebp - 8], eax
add eax, 8
mov dword [ebp - 0xc], eax
push eax
mov eax, dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], eax
call eax
mov edi, dword [ebp - 8]
xor ebx, ebx
xor esi, esi
nop
push 1
push esi
mov ecx, edi
call fcn.00481e20
inc esi
or ebx, eax
cmp esi, 4
jb 0x495e60
mov edi, dword [ebp - 0x10]
push dword [ebp - 0xc]
test ebx, ebx
je 0x495e95
mov eax, dword [ebp - 8]
or dword [eax + 0x10c], 1
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ebx, dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov dword [ebp - 0xc], ebx
call ebx
cmp dword [edi + 0x41c], 0
je 0x495ed7
mov ecx, dword [edi + 0x474]
push 1
push 0xa08f351b
mov dword [edi + 0x410], 1
call fcn.00405710
mov ecx, dword [edi + 0x474]
push 0
push 0xf359bda5
call fcn.00405710
mov ecx, dword [edi + 0x4b0]
xor eax, eax
cmp dword [edi + 0x26c], eax
setne al
mov dword [ecx + 0xac], eax
mov eax, dword [edi + 0x260]
mov esi, dword [edi + 0x4b4]
shr eax, 3
imul ecx, eax, 0xc8
mov eax, 0x10624dd3
mul ecx
shr edx, 6
mov dword [esi + 0x1c], edx
mov esi, dword [edi + 0x474]
lea eax, [esi + 4]
push eax
call dword [ebp - 4]
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x28]
and ecx, 0xa08f351b
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x495f49
cmp dword [eax + 8], 0xa08f351b
je 0x495f42
mov eax, dword [eax + 4]
test eax, eax
jne 0x495f30
jmp 0x495f49
mov dword [eax + 0x3c], 1
lea eax, [esi + 4]
push eax
call ebx
mov esi, dword [edi + 0x474]
lea eax, [esi + 4]
push eax
call dword [ebp - 4]
mov ecx, dword [esi + 0x20]
mov eax, dword [esi + 0x28]
and ecx, 0xf359bda5
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x495f89
nop
cmp dword [eax + 8], 0xf359bda5
je 0x495f82
mov eax, dword [eax + 4]
test eax, eax
jne 0x495f70
jmp 0x495f89
mov dword [eax + 0x3c], 1
lea eax, [esi + 4]
push eax
call ebx
mov ecx, dword [edi + 0x310]
mov eax, dword [edi + 0x4b4]
add ecx, ecx
sub ecx, dword [edi + 0x318]
add ecx, dword [edi + 0x30c]
mov dword [eax + 0x90], ecx
mov eax, dword [edi + 0x4b4]
cmp dword [eax + 0x90], 0
jne 0x495fc8
mov dword [eax + 0x90], 1
mov esi, dword [edi + 0x4b8]
cmp dword [esi], 1
je 0x496015
push dword [edi + 0x264]
mov ecx, esi
call fcn.00434390
test eax, eax
jne 0x496015
lea eax, [ebp - 0x10]
mov dword [esi + 0x20], 1
push eax
push 0
push esi
push 0x433c80
push 0
push 0
call fcn.004d9be5
add esp, 0x18
mov dword [esi + 4], eax
push 1
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov dword [esi], 1
mov esi, dword [edi + 0x31c]
mov dword [ebp - 0x10], esi
lea eax, [esi*4]
push eax
call fcn.004d9a7e
add esp, 4
mov dword [edi + 0x4c4], eax
xor ebx, ebx
test esi, esi
je 0x4960b2
nop word [eax + eax]
push 0x10
call fcn.004d3886
mov dword [ebp - 8], eax
add esp, 4
mov dword [eax + 8], edi
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 0xc], 0
mov ecx, dword [edi + 0x4c4]
mov dword [ecx + ebx*4], eax
mov eax, dword [edi + 0x4c4]
mov esi, dword [eax + ebx*4]
cmp dword [esi], 1
je 0x4960ac
lea eax, [ebp - 0x14]
mov dword [esi + 0xc], 1
push eax
push 0
push esi
push 0x434600
push 0
push 0
call fcn.004d9be5
add esp, 0x18
mov dword [esi + 4], eax
push 0
push eax
call dword [sym.imp.KERNEL32.dll_SetThreadPriority]
mov dword [esi], 1
inc ebx
cmp ebx, dword [ebp - 0x10]
jb 0x496040
mov ebx, dword [edi + 0x4dc]
lea esi, [ebx + 0xc]
push esi
call dword [ebp - 4]
cmp dword [ebx + 8], 0
push esi
mov esi, dword [ebp - 0xc]
je 0x4960cd
call esi
jmp 0x4960d6
call esi
mov dword [ebx + 8], 1
mov eax, dword [edi + 0x46c]
mov dword [ebp - 0x10], eax
mov dword [eax + 0x34], 1
mov eax, dword [eax + 0x38]
mov ebx, dword [eax + 0x474]
lea eax, [ebx + 4]
push eax
call dword [ebp - 4]
mov ecx, dword [ebx + 0x20]
mov eax, dword [ebx + 0x28]
and ecx, 0x4f9c56ac
mov eax, dword [eax + ecx*4]
test eax, eax
je 0x496129
nop dword [eax]
cmp dword [eax + 8], 0x4f9c56ac
je 0x496122
mov eax, dword [eax + 4]
test eax, eax
jne 0x496110
jmp 0x496129
mov dword [eax + 0x3c], 1
lea eax, [ebx + 4]
push eax
call esi
mov ecx, dword [ebp - 0x10]
lea eax, [ebp - 0x2c]
push eax
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], 0
mov ecx, dword [ecx + 0x38]
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov ecx, dword [ecx + 0x474]
mov dword [ebp - 0x2c], 0x4f9c56ac
call fcn.004053a0
mov dword [edi + 0x408], 1
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret