Function at 0x1000c7f0
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x91c
push ebx
push esi
mov esi, ecx
xor ebx, ebx
mov dword [esp + 0x14], ebx
push edi
mov dword [esp + 0x10], esi
lea edi, [ebx + 1]
mov dword [esi], 0x1006ee34
cmp byte [esi + 0x24], bl
je 0x1000c85c
mov ecx, 0x10077e6c
mov dword [esp + 0x34], 0xffffffff
call fcn.10015bd0
mov esi, eax
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
cmp byte [0x10077e88], bl
mov eax, 4
cmovne eax, edi
dec dword [0x10077e68]
jne 0x1000c851
push eax
call dword [sym.imp.WINMM.dll_timeEndPeriod]
push esi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [esp + 0x10]
xor edi, edi
mov dword [esp + 0xc], edi
mov ecx, esi
call fcn.1000da60
cmp dword [esi + 0x1c], 0
jne 0x1000c921
mov eax, dword [esi + 0xb4]
lea edi, [esi + 0xc]
mov dword [esp + 0x14], eax
test bl, 8
je 0x1000c898
lea ecx, [esp + 0x248]
and ebx, 0xfffffff7
call fcn.10003360
mov eax, dword [esp + 0x14]
lea esi, [eax + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [esp + 0x14]
cmp dword [eax + 0x34], 0
jne 0x1000c8b2
mov byte [eax + 0x40], 0
jmp 0x1000c905
lea edx, [eax + 0x24]
cmp edx, edi
je 0x1000c905
mov eax, dword [edi]
mov ecx, dword [edx]
mov dword [edx], eax
mov dword [edi], ecx
mov eax, dword [edx]
test eax, eax
je 0x1000c8c9
mov dword [eax], edx
mov eax, dword [edi]
test eax, eax
je 0x1000c8d1
mov dword [eax], edi
mov ecx, dword [edx + 4]
mov eax, dword [edi + 4]
mov dword [edx + 4], eax
mov dword [edi + 4], ecx
mov ecx, dword [edx + 8]
mov eax, dword [edi + 8]
mov dword [edx + 8], eax
mov dword [edi + 8], ecx
mov ecx, dword [edx + 0xc]
mov eax, dword [edi + 0xc]
mov dword [edx + 0xc], eax
mov dword [edi + 0xc], ecx
mov eax, dword [edi + 0x10]
mov ecx, dword [edx + 0x10]
mov dword [edx + 0x10], eax
mov eax, dword [esp + 0x14]
mov dword [edi + 0x10], ecx
mov edi, dword [eax + 8]
push esi
mov dword [eax + 8], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov esi, dword [esp + 0x10]
add dword [esi + 0x20], edi
mov edi, dword [esp + 0xc]
mov ecx, esi
call fcn.1000da60
test al, al
je 0x1000c93a
inc edi
mov dword [esp + 0xc], edi
cmp edi, 0x64
jl 0x1000c862
test bl, 4
je 0x1000c94e
lea ecx, [esp + 0x508]
and ebx, 0xfffffffb
call fcn.10003360
mov eax, dword [esi + 0x5c]
or edi, 0xffffffff
sub eax, dword [esi + 0x58]
test eax, 0xfffffffc
je 0x1000cbb5
lea eax, [esi + 0x54]
push eax
lea ecx, [esp + 0x28]
call fcn.1000eb90
mov esi, dword [esp + 0x2c]
mov edi, dword [esp + 0x24]
test edi, edi
je 0x1000cbae
test bl, 0x10
je 0x1000c990
lea ecx, [esp + 0x38]
and ebx, 0xffffffef
call fcn.10003360
cmp byte [edi + 5], 0
je 0x1000ca15
cmp dword [esp + 0x28], 0
je 0x1000ca15
test bl, 0x20
je 0x1000c9b1
lea ecx, [esp + 0x7c8]
and ebx, 0xffffffdf
call fcn.10003360
test bl, bl
jns 0x1000c9c7
lea ecx, [esp + 0x3a8]
and ebx, 0xffffff7f
call fcn.10003360
xor eax, eax
cmp byte [edi + 5], al
mov edi, dword [esp + 0x24]
cmovne eax, dword [esp + 0x28]
mov ecx, dword [eax + 8]
mov edx, dword [eax + 4]
sub ecx, edx
sar ecx, 2
lea eax, [esp + 0x14]
cmp ecx, dword [esp + 0x30]
mov dword [esp + 0x14], ecx
lea ecx, [esp + 0x30]
cmovae eax, ecx
mov ecx, dword [eax]
cmp esi, ecx
jae 0x1000ca15
lea eax, [edx + esi*4]
lea esp, [esp]
cmp dword [eax], 0
jne 0x1000caf3
inc esi
add eax, 4
mov dword [esp + 0x2c], esi
cmp esi, ecx
jb 0x1000ca00
test edi, edi
je 0x1000cbae
test ebx, 0x100
je 0x1000ca37
lea ecx, [esp + 0x668]
and ebx, 0xfffffeff
call fcn.10003360
cmp byte [edi + 5], 0
je 0x1000cb8e
mov esi, dword [esp + 0x28]
test esi, esi
je 0x1000cb8e
test ebx, 0x200
je 0x1000ca67
lea ecx, [esp + 0xe8]
and ebx, 0xfffffdff
call fcn.10003360
test ebx, 0x800
je 0x1000ca81
lea ecx, [esp + 0x198]
and ebx, 0xfffff7ff
call fcn.10003360
xor eax, eax
cmp byte [edi + 5], al
cmovne eax, esi
dec dword [eax + 0x10]
jne 0x1000cb8e
test ebx, 0x1000
je 0x1000caac
lea ecx, [esp + 0x2f8]
and ebx, 0xffffefff
call fcn.10003360
test ebx, 0x4000
je 0x1000cac6
lea ecx, [esp + 0x458]
and ebx, 0xffffbfff
call fcn.10003360
xor ecx, ecx
mov byte [esp + 0x23], 0
cmp byte [edi + 5], cl
cmovne ecx, esi
mov dword [esp + 0xc], ecx
mov eax, dword [ecx + 8]
mov esi, dword [ecx + 4]
mov dword [esp + 0x18], eax
cmp esi, eax
je 0x1000cb51
cmp dword [esi], 0
je 0x1000cb14
add esi, 4
cmp esi, eax
jne 0x1000cae5
jmp 0x1000cb51
cmp esi, ecx
jae 0x1000ca15
mov ecx, dword [edx + esi*4]
inc esi
mov dword [esp + 0x2c], esi
test ecx, ecx
je 0x1000ca15
mov eax, dword [ecx]
call dword [eax]
jmp 0x1000c977
cmp esi, eax
je 0x1000cb51
lea ecx, [esi + 4]
mov edi, eax
sub edi, ecx
xor edx, edx
add edi, 3
shr edi, 2
cmp ecx, eax
cmova edi, edx
mov dword [esp + 0x1c], edi
test edi, edi
je 0x1000cb4d
mov eax, edi
mov edi, dword [ecx]
test edi, edi
je 0x1000cb41
mov dword [esi], edi
add esi, 4
inc edx
add ecx, 4
cmp edx, eax
jne 0x1000cb36
mov eax, dword [esp + 0x18]
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx + 4]
mov dword [esp + 0x18], esi
cmp esi, edx
jne 0x1000cb66
cmp eax, dword [ecx + 8]
jne 0x1000cb66
mov dword [ecx + 8], edx
jmp 0x1000cb8e
cmp esi, eax
je 0x1000cb8e
mov ecx, dword [ecx + 8]
sub ecx, eax
sar ecx, 2
lea edi, [ecx*4]
push edi
push eax
push esi
call fcn.10049af0
mov ecx, dword [esp + 0x18]
lea eax, [edi + esi]
add esp, 0xc
mov dword [ecx + 8], eax
mov ecx, dword [esp + 0x24]
or edi, 0xffffffff
mov eax, edi
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x1000cbb1
push ecx
call fcn.100499a5
add esp, 4
jmp 0x1000cbb1
or edi, 0xffffffff
mov esi, dword [esp + 0x10]
mov eax, dword [esi + 0xc0]
mov dword [esp + 0xc], eax
mov dword [esi + 0xc0], 0
test eax, eax
je 0x1000cc2d
test ebx, 0x8000
je 0x1000cbe7
lea ecx, [esp + 0x5b8]
and ebx, 0xffff7fff
call fcn.10003360
call fcn.10015e90
xor edx, edx
mov ecx, dword [eax]
call fcn.10016420
mov ecx, dword [esp + 0xc]
mov edx, dword [ecx]
test edx, edx
je 0x1000cc24
add edx, 4
mov eax, edi
lock xadd dword [edx], eax
dec eax
setne al
test al, al
jne 0x1000cc24
test edx, edx
je 0x1000cc19
lea ecx, [edx - 4]
jmp 0x1000cc1b
xor ecx, ecx
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [esp + 0xc]
push ecx
call fcn.100499a5
add esp, 4
mov dword [esi + 0xc0], 0
mov edi, dword [esi + 0xb4]
lea esi, [edi + 0xc]
push esi
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
push esi
mov dword [edi + 0x38], 0
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov edi, dword [esp + 0x10]
or esi, 0xffffffff
mov ecx, dword [edi + 0xb4]
mov dword [edi + 0xb4], 0
test ecx, ecx
je 0x1000cc90
add ecx, 4
mov eax, esi
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x1000cc90
test ecx, ecx
je 0x1000cc90
add ecx, 0xfffffffc
je 0x1000cc90
mov eax, dword [ecx]
push 1
call dword [eax]
mov ecx, dword [edi + 0xb8]
mov dword [edi + 0xb8], 0
test ecx, ecx
je 0x1000ccc5
add ecx, 4
mov eax, esi
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x1000ccc5
test ecx, ecx
je 0x1000ccbe
add ecx, 0xfffffffc
jmp 0x1000ccc0
xor ecx, ecx
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [edi + 0xbc]
mov dword [edi + 0xbc], 0
test ecx, ecx
je 0x1000ccfa
add ecx, 4
mov eax, esi
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x1000ccfa
test ecx, ecx
je 0x1000ccf3
add ecx, 0xfffffffc
jmp 0x1000ccf5
xor ecx, ecx
mov eax, dword [ecx]
call dword [eax + 0xc]
mov eax, dword [0x10077ddc]
test eax, 0xfffffffe
jne 0x1000cd8c
mov edx, 0x10077ddc
xor eax, eax
mov ecx, 1
lock cmpxchg dword [edx], ecx
test eax, eax
je 0x1000cd40
mov eax, dword [0x10077ddc]
cmp eax, 1
jne 0x1000cd8c
mov esi, dword [sym.imp.KERNEL32.dll_Sleep]
mov edi, edi
push 0
call esi
mov eax, dword [0x10077ddc]
cmp eax, 1
je 0x1000cd30
jmp 0x1000cd8c
mov dword [0x10077de0], 0
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x10077de0], eax
cmp eax, 0xffffffff
jne 0x1000cd68
cmp byte [0x10077e50], 0
jne 0x1000cfae
int3
test ebx, 0x10000
je 0x1000cd82
lea ecx, [esp + 0x718]
and ebx, 0xfffeffff
call fcn.10003360
mov dword [0x10077ddc], 0x10077de0
mov ecx, dword [0x10077ddc]
xor edx, edx
mov ecx, dword [ecx]
call fcn.10016420
mov esi, dword [edi + 0xc0]
test esi, esi
je 0x1000cdf8
test ebx, 0x20000
je 0x1000cdb9
lea ecx, [esp + 0x878]
call fcn.10003360
call fcn.10015e90
xor edx, edx
mov ecx, dword [eax]
call fcn.10016420
mov ecx, dword [esi]
test ecx, ecx
je 0x1000cdef
add ecx, 4
or eax, 0xffffffff
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x1000cdef
test ecx, ecx
je 0x1000cde8
add ecx, 0xfffffffc
jmp 0x1000cdea
xor ecx, ecx
mov eax, dword [ecx]
call dword [eax + 0xc]
push esi
call fcn.100499a5
add esp, 4
mov ecx, dword [edi + 0xbc]
or ebx, 0xffffffff
test ecx, ecx
je 0x1000ce26
add ecx, 4
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x1000ce26
test ecx, ecx
je 0x1000ce1f
add ecx, 0xfffffffc
jmp 0x1000ce21
xor ecx, ecx
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [edi + 0xb8]
test ecx, ecx
je 0x1000ce51
add ecx, 4
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x1000ce51
test ecx, ecx
je 0x1000ce4a
add ecx, 0xfffffffc
jmp 0x1000ce4c
xor ecx, ecx
mov eax, dword [ecx]
call dword [eax + 0xc]
mov ecx, dword [edi + 0xb4]
test ecx, ecx
je 0x1000ce7b
add ecx, 4
mov eax, ebx
lock xadd dword [ecx], eax
dec eax
setne al
test al, al
jne 0x1000ce7b
test ecx, ecx
je 0x1000ce7b
add ecx, 0xfffffffc
je 0x1000ce7b
mov eax, dword [ecx]
push 1
call dword [eax]
mov eax, dword [edi + 0x9c]
test eax, eax
je 0x1000ceac
push eax
call fcn.100499a5
add esp, 4
mov dword [edi + 0x9c], 0
mov dword [edi + 0xa0], 0
mov dword [edi + 0xa4], 0
lea ecx, [edi + 0x98]
call fcn.10012510
cmp dword [edi + 0x8c], 0x10
jb 0x1000cecb
push dword [edi + 0x78]
call fcn.100499a5
add esp, 4
mov dword [edi + 0x8c], 0xf
mov dword [edi + 0x88], 0
mov byte [edi + 0x78], 0
mov ecx, dword [edi + 0x70]
test ecx, ecx
je 0x1000ceff
lock xadd dword [ecx], ebx
dec ebx
setne al
test al, al
jne 0x1000ceff
mov eax, dword [ecx + 4]
push ecx
call eax
add esp, 4
mov eax, dword [edi + 0x58]
test eax, eax
je 0x1000cf24
push eax
call fcn.100499a5
add esp, 4
mov dword [edi + 0x58], 0
mov dword [edi + 0x5c], 0
mov dword [edi + 0x60], 0
lea ecx, [edi + 0x54]
call fcn.10012510
lea ecx, [edi + 0x40]
call fcn.1000e6a0
push dword [edi + 0x40]
call fcn.100499a5
mov dword [edi + 0x40], 0
add esp, 4
mov ecx, dword [edi + 0x28]
test ecx, ecx
je 0x1000cf7a
push dword [esp + 0x34]
mov edx, dword [edi + 0x2c]
push ecx
call fcn.1000efb0
push dword [edi + 0x28]
call fcn.100499a5
add esp, 0xc
mov dword [edi + 0x28], 0
mov dword [edi + 0x2c], 0
mov dword [edi + 0x30], 0
lea ecx, [edi + 0xc]
call fcn.1000e6a0
push dword [edi + 0xc]
call fcn.100499a5
mov dword [edi + 0xc], 0
add esp, 4
mov ecx, dword [edi + 4]
test ecx, ecx
je 0x1000cfa1
mov eax, dword [ecx]
push 1
call dword [eax]
mov dword [edi], 0x1006ee60
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push 1
call fcn.1004d551
int3