Function at 0x10048b5
Capabilities:
Create thread

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x24
push ebx
push esi
mov esi, 0x101711c
xor ebx, ebx
mov dword [ebp - 4], 0x80004005
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x24], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push 0x64
mov dword [ebp - 0x1c], eax
call fcn.01011013
cmp eax, ebx
pop ecx
je 0x10048f1
mov ecx, eax
call fcn.01003c5e
jmp 0x10048f3
xor eax, eax
cmp eax, ebx
mov ecx, dword [ebp + 8]
mov dword [ecx], eax
jne 0x1004906
mov esi, 0x8007000e
jmp 0x1004a67
push edi
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x101713c]
jmp 0x100492f
mov edi, dword [ebp + 0x10]
push 4
pop ecx
lea esi, [eax + 8]
xor edx, edx
repe cmpsd dword [esi], dword es:[edi]
jne 0x100492d
cmp dword [eax + 0x24], ebx
je 0x10049c3
mov eax, dword [eax]
cmp eax, ebx
jne 0x1004915
push ebx
push ebx
xor edi, edi
inc edi
push edi
push ebx
call fcn.01012879
cmp eax, ebx
mov dword [ebp - 0x18], eax
je 0x1004a2c
lea eax, [ebp - 8]
push eax
push ebx
lea eax, [ebp - 0x18]
push eax
push 0x1004267
push ebx
push ebx
call dword [sym.imp.KERNEL32.dll_CreateThread]
mov esi, eax
cmp esi, ebx
mov dword [ebp - 0xc], esi
je 0x1004a1a
push 0xffffffffffffffff
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
mov eax, dword [ebp - 0x14]
cmp eax, ebx
mov dword [ebp - 4], eax
jne 0x1004a11
push 0x28
call fcn.01010fcd
cmp eax, ebx
je 0x1004a0a
mov dword [eax + 4], edi
mov dword [eax], ebx
mov ecx, dword [ebp - 0x10]
mov dword [eax + 0x20], ecx
mov ecx, dword [ebp - 8]
mov dword [eax + 0x18], esi
mov esi, dword [ebp + 0x10]
mov dword [eax + 0x1c], ecx
lea edi, [eax + 8]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [eax + 0x24], ebx
mov ecx, dword [0x101713c]
cmp ecx, ebx
jne 0x10049e8
mov dword [0x101713c], eax
jmp 0x10049ee
inc dword [eax + 4]
push eax
lea ecx, [eax + 8]
push ecx
push dword [ebp + 0xc]
push dword [eax + 0x18]
push dword [eax + 0x1c]
push dword [eax + 0x20]
mov eax, dword [ebp + 8]
push dword [eax]
call fcn.01003ca2
mov dword [ebp - 4], eax
jmp 0x1004a2c
mov ecx, dword [ecx]
cmp dword [ecx], ebx
jne 0x10049e6
mov dword [ecx], eax
push eax
push dword [ebp + 0x10]
mov eax, dword [ebp + 8]
push dword [ebp + 0xc]
push dword [ebp - 0xc]
push dword [ebp - 8]
push dword [ebp - 0x10]
push dword [eax]
call fcn.01003ca2
jmp 0x1004a23
mov dword [ebp - 4], 0x8007000e
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1004a23
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 4], eax
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x101711c
mov dword [ebp - 0x24], ebx
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
cmp dword [ebp - 4], ebx
mov esi, dword [ebp + 8]
pop edi
jne 0x1004a56
mov eax, dword [esi]
cmp eax, ebx
je 0x1004a64
push eax
call fcn.01003e51
cmp eax, ebx
mov dword [ebp - 4], eax
je 0x1004a64
mov eax, dword [esi]
cmp eax, ebx
je 0x1004a64
push eax
call fcn.01004480
mov dword [esi], ebx
mov esi, dword [ebp - 4]
lea ecx, [ebp - 0x24]
call fcn.01003afc
mov eax, esi
pop esi
pop ebx
leave
ret 0xc