Function at 0x1002aff4
Capabilities:
Allocate thread local storage

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x108
movzx eax, byte [ebp + 0x10]
test eax, eax
je 0x1002b032
mov eax, dword [ebp + 8]
mov dword [ebp - 0xcc], eax
mov eax, dword [ebp - 0xcc]
mov dword [ebp - 0xd4], eax
mov eax, dword [ebp - 0xd4]
movzx eax, byte [eax]
test eax, eax
je 0x1002b02d
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
jmp 0x1002b77c
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x40], eax
mov dword [ebp - 0x14], 0xca4f833f
mov dword [ebp - 4], 0xf3d4210e
mov dword [ebp - 0x4c], 0
jmp 0x1002b065
mov eax, dword [ebp - 0x4c]
inc eax
mov dword [ebp - 0x4c], eax
cmp dword [ebp - 0x4c], 3
jge 0x1002b07b
mov eax, dword [ebp - 0x4c]
mov dword [ebp + eax*4 - 0x108], 1
jmp 0x1002b05e
mov dword [ebp - 0x14], 0
jmp 0x1002b08b
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 2
jg 0x1002b0b2
mov dword [ebp - 0xe4], 6
lea eax, [ebp - 4]
push eax
push 0
lea eax, [ebp - 0xe4]
push eax
call fcn.1002d144
add esp, 0xc
jmp 0x1002b084
mov dword [ebp - 0x14], 0xffffffe3
jmp 0x1002b0c2
mov eax, dword [ebp - 0x14]
inc eax
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0xfffffff2
jge 0x1002b162
mov dword [ebp - 4], 0
jmp 0x1002b0dc
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 2
jg 0x1002b117
mov dword [ebp - 0xe0], 0xa7b051af
mov eax, dword [ebp - 4]
cmp dword [ebp + eax*4 - 0x108], 0x3735b263
jl 0x1002b105
mov dword [ebp - 0x7c], 1
jmp 0x1002b109
and dword [ebp - 0x7c], 0
mov eax, dword [ebp - 4]
add eax, dword [ebp - 0x7c]
mov dword [ebp - 0xe0], eax
jmp 0x1002b0d5
mov dword [ebp - 4], 0
jmp 0x1002b127
mov eax, dword [ebp - 4]
inc eax
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 2
jg 0x1002b15d
mov byte [ebp - 0x15], 0
movzx eax, byte [ebp - 0x15]
test eax, eax
je 0x1002b141
push 0
call fcn.10029868
pop ecx
mov byte [ebp - 0x17], 0
movzx eax, byte [ebp - 0x17]
test eax, eax
je 0x1002b15b
push 0
push 0xd27
call fcn.1002978f
pop ecx
pop ecx
jmp 0x1002b120
jmp 0x1002b0bb
mov eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x60]
mov ecx, dword [ecx + 0x10]
mov dword [eax], ecx
mov dword [ebp - 0x48], 0x97f6af11
mov dword [ebp - 0x48], 0xfffffffe
jmp 0x1002b184
mov eax, dword [ebp - 0x48]
dec eax
mov dword [ebp - 0x48], eax
cmp dword [ebp - 0x48], 0xfffffffd
jge 0x1002b1c4
mov dword [ebp - 0x2c], 0
mov byte [ebp - 0x21], 0
lea eax, [ebp - 0x21]
push eax
push 0
call fcn.100297ce
pop ecx
pop ecx
mov dword [ebp - 0x2c], 0xffffffec
jmp 0x1002b1b2
mov eax, dword [ebp - 0x2c]
inc eax
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0xd
jl 0x1002b1c2
cmp dword [ebp - 0x2c], 0
je 0x1002b1c0
jmp 0x1002b1c2
jmp 0x1002b1ab
jmp 0x1002b17d
mov eax, dword [ebp - 0x40]
cmp dword [eax], 0
jne 0x1002b77c
mov dword [ebp - 0x30], 0x1e1e87df
mov dword [ebp - 0x5c], 0xfffffff7
mov dword [ebp - 0xc], 0
jmp 0x1002b1ee
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 1
jge 0x1002b201
mov eax, dword [ebp - 0xc]
mov dword [ebp + eax*4 - 8], 0xfffffff8
jmp 0x1002b1e7
mov dword [ebp - 0xc], 0
jmp 0x1002b211
mov eax, dword [ebp - 0xc]
inc eax
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 1
jge 0x1002b224
mov eax, dword [ebp - 0xc]
mov dword [ebp + eax*4 - 0x28], 0x4888999d
jmp 0x1002b20a
push 4
pop eax
imul eax, eax, 0
mov ecx, dword [ebp - 0x30]
cmp dword [ebp + eax - 8], ecx
jle 0x1002b23c
mov dword [ebp - 0x6c], 1
jmp 0x1002b240
and dword [ebp - 0x6c], 0
push 4
pop eax
imul eax, eax, 0
mov eax, dword [ebp + eax - 8]
cmp dword [ebp - 0x6c], eax
jge 0x1002b25b
mov dword [ebp - 0xb4], 1
jmp 0x1002b262
and dword [ebp - 0xb4], 0
mov eax, dword [ebp - 0x30]
sub eax, dword [ebp - 0xb4]
cmp eax, 0x5689
jne 0x1002b27e
mov dword [ebp - 0xa0], 1
jmp 0x1002b285
and dword [ebp - 0xa0], 0
push 4
pop eax
imul eax, eax, 0
mov eax, dword [ebp + eax - 8]
mov dword [ebp - 0x74], eax
push 4
pop eax
imul eax, eax, 0
mov ecx, dword [ebp - 0x74]
mov dword [ebp + eax - 0x28], ecx
mov eax, dword [ebp - 0x74]
cmp eax, dword [ebp - 0xa0]
jge 0x1002b2b3
mov dword [ebp - 0x64], 1
jmp 0x1002b2b7
and dword [ebp - 0x64], 0
mov eax, dword [ebp - 0x30]
push 4
pop ecx
imul ecx, ecx, 0
mov ecx, dword [ebp + ecx - 8]
imul ecx, dword [ebp - 0x64]
add eax, ecx
je 0x1002b3cf
mov dword [ebp - 0x20], 0
mov dword [ebp - 0x8c], 0x7c57f39c
cmp dword [ebp - 0x20], 0
je 0x1002b330
mov eax, dword [ebp - 0x20]
mov dword [ebp - 0xe8], eax
mov eax, dword [ebp - 0x30]
cmp dword [ebp - 0x8c], eax
jge 0x1002b307
mov dword [ebp - 0xa8], 1
jmp 0x1002b30e
and dword [ebp - 0xa8], 0
mov eax, dword [ebp - 0x20]
imul eax, dword [ebp - 0xa8]
push 4
pop ecx
imul ecx, ecx, 0
cmp eax, dword [ebp + ecx - 8]
jne 0x1002b330
mov dword [ebp - 0x84], 1
jmp 0x1002b337
and dword [ebp - 0x84], 0
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0x84], eax
jg 0x1002b34e
mov dword [ebp - 0xb0], 1
jmp 0x1002b355
and dword [ebp - 0xb0], 0
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0xb0]
jl 0x1002b375
cmp dword [ebp - 0x8c], 0
je 0x1002b375
mov dword [ebp - 0xb8], 1
jmp 0x1002b37c
and dword [ebp - 0xb8], 0
mov eax, dword [ebp - 0x20]
cmp dword [ebp - 0xb8], eax
jl 0x1002b393
mov dword [ebp - 0x94], 1
jmp 0x1002b39a
and dword [ebp - 0x94], 0
mov eax, dword [ebp - 0x94]
sub eax, 0x5900b088
cmp dword [ebp - 0x20], eax
je 0x1002b3b3
mov dword [ebp - 0x54], 1
jmp 0x1002b3b7
and dword [ebp - 0x54], 0
push 4
pop eax
imul eax, eax, 0
mov ecx, dword [ebp - 0x54]
mov dword [ebp + eax - 0x28], ecx
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x5c], eax
jmp 0x1002b64e
mov dword [ebp - 0x10], 0xc214
mov dword [ebp - 0x44], 0
jmp 0x1002b3e6
mov eax, dword [ebp - 0x44]
inc eax
mov dword [ebp - 0x44], eax
cmp dword [ebp - 0x44], 3
jge 0x1002b3fc
mov eax, dword [ebp - 0x44]
mov dword [ebp + eax*4 - 0xf8], 0x447d0519
jmp 0x1002b3df
mov eax, dword [ebp - 0x10]
push 4
pop ecx
imul ecx, ecx, 0
imul eax, dword [ebp + ecx - 8]
test eax, eax
jne 0x1002b564
push 4
pop eax
imul eax, eax, 0
cmp dword [ebp + eax - 0x28], 0
je 0x1002b4bf
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0xfc], eax
push 4
pop eax
imul eax, eax, 0
cmp dword [ebp + eax - 0x28], 0x395c
jne 0x1002b448
mov dword [ebp - 0xc0], 1
jmp 0x1002b44f
and dword [ebp - 0xc0], 0
cmp dword [ebp - 0xc0], 0
jne 0x1002b464
mov dword [ebp - 0x9c], 1
jmp 0x1002b46b
and dword [ebp - 0x9c], 0
cmp dword [ebp - 0x9c], 0xfffb
jbe 0x1002b483
mov dword [ebp - 0xc8], 1
jmp 0x1002b48a
and dword [ebp - 0xc8], 0
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0xc8], eax
jne 0x1002b4a1
mov dword [ebp - 0xa4], 1
jmp 0x1002b4a8
and dword [ebp - 0xa4], 0
mov eax, dword [ebp - 0xa4]
sub eax, dword [ebp - 0x10]
je 0x1002b4bf
mov dword [ebp - 0xc4], 1
jmp 0x1002b4c6
and dword [ebp - 0xc4], 0
cmp dword [ebp - 0xc4], 0x964e
jle 0x1002b4eb
push 4
pop eax
imul eax, eax, 0
cmp dword [ebp + eax - 8], 0
je 0x1002b4eb
mov dword [ebp - 0xac], 1
jmp 0x1002b4f2
and dword [ebp - 0xac], 0
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0xac], eax
je 0x1002b509
mov dword [ebp - 0xbc], 1
jmp 0x1002b510
and dword [ebp - 0xbc], 0
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0xbc], eax
jne 0x1002b524
mov dword [ebp - 0x68], 1
jmp 0x1002b528
and dword [ebp - 0x68], 0
mov eax, dword [ebp - 0x68]
sub eax, dword [ebp - 0x5c]
cmp eax, dword [ebp - 0x10]
jg 0x1002b53c
mov dword [ebp - 0x70], 1
jmp 0x1002b540
and dword [ebp - 0x70], 0
mov eax, dword [ebp - 0x10]
cmp dword [ebp - 0x70], eax
jne 0x1002b551
mov dword [ebp - 0x58], 1
jmp 0x1002b555
and dword [ebp - 0x58], 0
push 4
pop eax
shl eax, 1
mov ecx, dword [ebp - 0x58]
mov dword [ebp + eax - 0xf8], ecx
push 4
pop eax
imul eax, eax, 0
mov ecx, 0xffff
sub ecx, dword [ebp + eax - 8]
push 4
pop eax
imul eax, eax, 0
mov dword [ebp + eax - 0x28], ecx
cmp dword [ebp - 0x30], 0
jne 0x1002b596
push 4
pop eax
imul eax, eax, 0
cmp dword [ebp + eax - 8], 0
jne 0x1002b596
and dword [ebp - 0x78], 0
jmp 0x1002b59d
mov dword [ebp - 0x78], 1
cmp dword [ebp - 0x78], 6
jae 0x1002b5ac
mov dword [ebp - 0x80], 1
jmp 0x1002b5b0
and dword [ebp - 0x80], 0
cmp dword [ebp - 0x10], 4
je 0x1002b5c2
mov dword [ebp - 0xd8], 1
jmp 0x1002b5c9
and dword [ebp - 0xd8], 0
push 4
pop eax
imul eax, eax, 0
mov eax, dword [ebp + eax - 8]
mov dword [ebp - 0xec], eax
push 4
pop eax
imul eax, eax, 0
cmp dword [ebp + eax - 0x28], 9
jl 0x1002b5f2
mov dword [ebp - 0xdc], 1
jmp 0x1002b5f9
and dword [ebp - 0xdc], 0
push 4
pop eax
imul eax, eax, 0
cmp dword [ebp + eax - 8], 0
jl 0x1002b612
mov dword [ebp - 0x88], 1
jmp 0x1002b619
and dword [ebp - 0x88], 0
mov eax, dword [ebp - 0x80]
add eax, dword [ebp - 0x88]
mov dword [ebp - 0x90], eax
push 4
pop eax
shl eax, 0
mov ecx, dword [ebp - 0x90]
mov dword [ebp + eax - 0xf8], ecx
mov eax, dword [ebp - 0x10]
add eax, dword [ebp - 0x90]
push 4
pop ecx
imul ecx, ecx, 0
mov dword [ebp + ecx - 0x28], eax
mov byte [ebp - 0x19], 0
movzx eax, byte [ebp - 0x19]
test eax, eax
je 0x1002b66e
push 0
push 0x3f9d
push 0x6ad4
call fcn.1002dd80
add esp, 0xc
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 0x24]
and eax, 0x40
je 0x1002b75a
mov dword [ebp - 0x38], 0xffffffff
mov dword [ebp - 0x50], 0
jmp 0x1002b694
mov eax, dword [ebp - 0x50]
inc eax
mov dword [ebp - 0x50], eax
cmp dword [ebp - 0x50], 1
jge 0x1002b6aa
mov eax, dword [ebp - 0x50]
mov dword [ebp + eax*4 - 0xd0], 0xec2e
jmp 0x1002b68d
mov dword [ebp - 0x38], 0
jmp 0x1002b6ba
mov eax, dword [ebp - 0x38]
dec eax
mov dword [ebp - 0x38], eax
cmp dword [ebp - 0x38], 0
jl 0x1002b722
mov dword [ebp - 0x3c], 0x32bb11ac
mov dword [ebp - 0x3c], 0
jmp 0x1002b6d7
mov eax, dword [ebp - 0x3c]
inc eax
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jg 0x1002b720
mov dword [ebp - 0x34], 0x3afc3718
mov byte [ebp - 0x16], 0
movzx eax, byte [ebp - 0x16]
test eax, eax
je 0x1002b6f8
push 0
call fcn.1002afd4
pop ecx
mov dword [ebp - 0x34], 0
jmp 0x1002b708
mov eax, dword [ebp - 0x34]
inc eax
mov dword [ebp - 0x34], eax
cmp dword [ebp - 0x34], 1
jge 0x1002b71e
mov eax, dword [ebp - 0x34]
mov dword [ebp + eax*4 - 0xd0], 0x425a
jmp 0x1002b701
jmp 0x1002b6d0
jmp 0x1002b6b3
mov byte [ebp - 0x18], 0
lea eax, [ebp - 0x18]
push eax
push 0x7be6
push 0
push 0x20d9
call fcn.1002a1df
add esp, 0x10
lea eax, [ebp - 0x40]
push eax
push 1
lea eax, [ebp - 0x98]
push eax
push 0x143c
call fcn.10029642
add esp, 0x10
jmp 0x1002b77c
mov eax, dword [ebp - 0x60]
mov eax, dword [eax + 0x24]
and eax, 0x80
je 0x1002b77c
push 0
lea eax, [ebp - 0x98]
push eax
lea eax, [ebp - 0x40]
push eax
call fcn.1002980e
add esp, 0xc
mov esp, ebp
pop ebp
ret