Function at 0x4953b0
Capabilities:
Create thread

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x583158
push fcn.004e1840
mov eax, dword fs:[0]
push eax
sub esp, 0x4c
push ebx
push esi
push edi
mov eax, dword [0x589780]
xor dword [ebp - 8], eax
xor eax, ebp
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov esi, dword [sym.imp.KERNEL32.dll_GetCurrentProcess]
call esi
mov ebx, eax
call esi
mov edi, eax
call esi
push 2
push 0
push 0
lea ecx, [ebp - 0x20]
push ecx
push ebx
push edi
push eax
call dword [sym.imp.KERNEL32.dll_DuplicateHandle]
test eax, eax
je 0x495425
push 0x100000
push dword [ebp - 0x20]
call fcn.00406c21
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
push dword [ebp - 0x20]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [0x58e158], 0
jne 0x495443
cmp byte [0x58e159], 0
jne 0x49543c
call fcn.0040b320
mov byte [0x58e158], 1
mov bl, 1
mov byte [ebp - 0x19], bl
push 0x58e140
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 0
xor esi, esi
mov edi, dword [ebp + 8]
mov dword [ebp - 0x2c], esi
cmp esi, dword [0x58e11c]
jge 0x495486
push edi
mov eax, dword [0x58e118]
mov eax, dword [eax + esi*4]
push dword [eax]
call fcn.00409bce
add esp, 8
test eax, eax
jne 0x4954de
xor bl, bl
mov byte [ebp - 0x19], bl
mov dword [ebp - 4], 0xfffffffe
call fcn.004954f0
test bl, bl
je 0x4956a0
xorps xmm0, xmm0
movlpd qword [ebp - 0x3c], xmm0
call fcn.004969e0
lea eax, [ebp - 0x3c]
push eax
push edi
call fcn.00496a70
add esp, 8
mov ebx, dword [ebp + 0x1c]
test ebx, ebx
jne 0x4954fc
push ebx
push 0x10
call fcn.004018ed
test eax, eax
setne al
movzx eax, al
push eax
lea eax, [ebp - 0x5c]
push eax
lea eax, [ebp - 0x48]
push eax
call fcn.0040a5c4
add esp, 0x10
jmp 0x495503
inc esi
jmp 0x49545f
mov dword [ebp - 0x4c], 0
push 0x18
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
mov dword [esi], 0x18
lea eax, [ebp - 0x3c]
mov dword [esi + 8], eax
lea ecx, [ebp - 0x5c]
test ebx, ebx
cmovne ecx, ebx
mov dword [esi + 0x10], ecx
mov dword [ebp - 0x24], 0xffffffff
push 0
push 0x12c
push 0x104
push esi
lea eax, [ebp - 0x24]
push eax
call dword [0x58e128]
push eax
push 0x5658e0
call fcn.004952d0
add esp, 8
mov bl, al
mov byte [ebp - 0x19], bl
push dword [ebp - 0x38]
call dword [sym.imp.KERNEL32.dll_LocalFree]
push esi
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x495573
push eax
call esi
test bl, bl
jne 0x49558b
xor al, al
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, 0x40
cmp dword [ebp + 0x14], ecx
cmovbe ecx, dword [ebp + 0x14]
mov dword [ebp - 0x30], ecx
push 0x4c
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov esi, eax
mov dword [ebp - 0x28], esi
push edi
call dword [sym.imp.KERNEL32.dll_lstrlenA]
inc eax
push eax
push 0x40
call dword [sym.imp.KERNEL32.dll_LocalAlloc]
mov dword [esi], eax
push edi
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0x10
call fcn.00403972
add esp, 4
test eax, eax
je 0x4955ec
mov dword [eax], 0
mov dword [eax + 4], 0
mov dword [eax + 8], 0
mov byte [eax + 0xc], 0
jmp 0x4955ee
xor eax, eax
mov edi, dword [ebp - 0x28]
mov dword [edi + 0x48], eax
mov eax, dword [ebp + 0xc]
mov dword [edi + 4], eax
mov eax, dword [ebp + 0x10]
mov dword [edi + 8], eax
mov eax, dword [ebp - 0x30]
mov dword [edi + 0xc], eax
mov eax, dword [ebp + 0x18]
mov dword [edi + 0x10], eax
mov eax, dword [ebp - 0x24]
mov dword [edi + 0x14], eax
push 0
push 0x7fffffff
push 0
push 0
call dword [sym.imp.KERNEL32.dll_CreateSemaphoreW]
mov dword [edi + 0x38], eax
lea eax, [edi + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_InitializeCriticalSection]
lea eax, [ebp - 0x34]
push eax
push 0
push edi
push 0x496ff0
push 0
push 0
mov esi, dword [sym.imp.KERNEL32.dll_CreateThread]
call esi
mov dword [edi + 0x40], eax
lea eax, [ebp - 0x34]
push eax
push 0
push edi
push 0x496c40
push 0
push 0
call esi
mov dword [edi + 0x44], eax
push 7
push dword [edi + 0x40]
mov esi, dword [sym.imp.KERNEL32.dll_SetThreadPriority]
call esi
push 1
push dword [edi + 0x44]
call esi
push 0x58e140
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov dword [ebp - 4], 1
lea eax, [ebp - 0x28]
push eax
mov ecx, 0x58e118
call fcn.0040afd8
mov dword [ebp - 4], 0xfffffffe
call fcn.004956b7
mov al, bl
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret