Function at 0x1003c557
Capabilities:
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc8
movzx eax, byte [ebp + 0x24]
test eax, eax
je 0x1003c61f
mov eax, dword [ebp + 0x18]
mov dword [ebp - 0xac], eax
lea eax, [ebp + 0x2c]
mov dword [ebp - 0xbc], eax
mov eax, dword [ebp + 0x34]
mov dword [ebp - 0x54], eax
mov eax, dword [ebp - 0xbc]
movzx eax, byte [eax]
test eax, eax
je 0x1003c610
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x5c], eax
mov eax, dword [ebp - 0xac]
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0x5c]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x94]
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 0xc]
mov dword [eax], 0xffffffe7
jmp 0x1003c5c8
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 0xc]
mov dword [ecx], eax
mov eax, dword [ebp - 0xc]
cmp dword [eax], 0xffffffea
je 0x1003c60e
mov dword [ebp - 0x64], 0
mov eax, dword [ebp - 0x44]
mov dword [eax], 0x374b1b05
push 1
push dword [ebp - 0x44]
push 0x47f0
push 0x23c2
push 0x58b9
lea eax, [ebp - 0x64]
push eax
push 0xe9c
push 0x43c1
push 1
call fcn.1003af3a
add esp, 0x24
jmp 0x1003c5bd
jmp 0x1003c61a
push 0
push 0
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
jmp 0x1003c88b
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x84], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x9c], eax
mov eax, dword [ebp + 0x28]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x8c], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x50], eax
mov eax, dword [ebp + 0x20]
mov dword [ebp - 0x60], eax
mov eax, dword [ebp + 0x1c]
mov dword [ebp - 0x68], eax
mov eax, dword [ebp + 0x40]
mov dword [ebp - 0xa4], eax
mov eax, dword [ebp + 0x30]
mov dword [ebp - 0x6c], eax
lea eax, [ebp + 0x3c]
mov dword [ebp - 0x4c], eax
mov eax, dword [ebp + 0x38]
mov dword [ebp - 0xc0], eax
mov eax, dword [ebp - 0x4c]
movzx eax, byte [eax]
test eax, eax
je 0x1003c6d3
mov eax, dword [ebp - 0x6c]
mov dword [ebp - 0x74], eax
mov eax, dword [ebp - 0x9c]
mov dword [ebp - 0xb4], eax
mov eax, dword [ebp - 0x74]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0xb4]
mov dword [ebp - 0x7c], eax
mov eax, dword [ebp - 4]
mov dword [eax], 0
jmp 0x1003c6b1
mov eax, dword [ebp - 4]
mov eax, dword [eax]
inc eax
mov ecx, dword [ebp - 4]
mov dword [ecx], eax
mov eax, dword [ebp - 4]
cmp dword [eax], 4
jge 0x1003c6ce
mov eax, dword [ebp - 4]
push dword [eax]
mov ecx, dword [ebp - 0x7c]
call fcn.10020420
mov dword [eax], 0xbbbb
jmp 0x1003c6a6
jmp 0x1003c88b
mov eax, dword [ebp - 0xa4]
mov dword [ebp - 0x70], eax
mov eax, dword [ebp - 0x84]
mov dword [ebp - 0x78], eax
mov eax, dword [ebp - 0xc0]
mov dword [ebp - 0x80], eax
mov eax, dword [ebp - 0x8c]
mov dword [ebp - 0x88], eax
mov eax, dword [ebp - 0x50]
mov dword [ebp - 0x90], eax
mov eax, dword [ebp - 0x58]
mov dword [ebp - 0x98], eax
mov eax, dword [ebp - 0x60]
mov dword [ebp - 0xa0], eax
mov eax, dword [ebp - 0x68]
mov dword [ebp - 0xa8], eax
mov eax, dword [ebp - 0x70]
mov dword [ebp - 0xb8], eax
mov eax, dword [ebp - 0x78]
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0x80]
mov dword [ebp - 0x28], eax
mov eax, dword [ebp - 0x88]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x90]
mov dword [ebp - 0x18], eax
mov eax, dword [ebp - 0x98]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0xa0]
mov dword [ebp - 0x48], eax
mov eax, dword [ebp - 0xa8]
mov dword [ebp - 0xb0], eax
mov eax, dword [ebp - 0x10]
mov ecx, dword [ebp - 8]
mov ecx, dword [ecx]
cmp dword [eax], ecx
jl 0x1003c778
mov dword [ebp - 0x34], 1
jmp 0x1003c77c
and dword [ebp - 0x34], 0
cmp dword [ebp - 0x34], 0xa107
jne 0x1003c78e
mov dword [ebp - 0x24], 1
jmp 0x1003c792
and dword [ebp - 0x24], 0
mov eax, dword [ebp - 8]
mov eax, dword [eax]
cmp eax, dword [ebp - 0x24]
jle 0x1003c7a5
mov dword [ebp - 0x2c], 1
jmp 0x1003c7a9
and dword [ebp - 0x2c], 0
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x10]
mov ecx, dword [ecx]
mov dword [eax], ecx
mov eax, dword [ebp - 0x18]
mov ecx, dword [ebp - 0x2c]
add ecx, 0x7919ee48
imul ecx, ecx, 0x9a78
cmp dword [eax], ecx
jle 0x1003c7d2
mov dword [ebp - 0x3c], 1
jmp 0x1003c7d6
and dword [ebp - 0x3c], 0
mov eax, dword [ebp - 0x48]
mov eax, dword [eax]
cmp dword [ebp - 0x3c], eax
je 0x1003c7e9
mov dword [ebp - 0x1c], 1
jmp 0x1003c7ed
and dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0xb0]
mov eax, dword [eax]
cmp dword [ebp - 0x1c], eax
jg 0x1003c803
mov dword [ebp - 0x20], 1
jmp 0x1003c807
and dword [ebp - 0x20], 0
cmp dword [ebp - 0x20], 0x2685
jne 0x1003c819
mov dword [ebp - 0x30], 1
jmp 0x1003c81d
and dword [ebp - 0x30], 0
mov eax, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x14]
mov ecx, dword [ecx]
mov dword [eax], ecx
mov eax, dword [ebp - 0x28]
mov eax, dword [eax]
imul eax, dword [ebp - 0x30]
mov ecx, dword [ebp - 8]
mov dword [ecx], eax
mov eax, dword [ebp - 8]
mov eax, dword [eax]
mov dword [ebp - 0xc4], eax
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
mov dword [ebp - 0xc8], eax
mov eax, dword [ebp - 0x10]
cmp dword [eax], 0x1c926a5a
jge 0x1003c85f
mov dword [ebp - 0x38], 1
jmp 0x1003c863
and dword [ebp - 0x38], 0
cmp dword [ebp - 0x38], 0xffffffff
je 0x1003c872
mov dword [ebp - 0x40], 1
jmp 0x1003c876
and dword [ebp - 0x40], 0
mov eax, dword [ebp - 0x14]
mov eax, dword [eax]
add eax, dword [ebp - 0x40]
mov ecx, dword [ebp - 0x48]
add eax, dword [ecx]
mov ecx, dword [ebp - 0xb8]
mov dword [ecx], eax
mov esp, ebp
pop ebp
ret