Function at 0x4049b0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffed4
xor eax, eax
mov dword [ebp - 0x12c], eax
mov dword [ebp - 0x128], eax
mov dword [ebp - 0x124], eax
mov dword [ebp - 0x120], eax
mov dword [ebp - 0x11c], eax
mov dword [ebp - 8], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x10], eax
mov dword [ebp - 0x14], eax
xor eax, eax
push ebp
push 0x404c38
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 1], 0
call fcn.00401990
add esp, 0xfffffff4
fstp xword [esp]
wait
lea eax, [ebp - 0x118]
call fcn.00401fb0
lea edx, [ebp - 0x118]
lea eax, [ebp - 0x14]
call fcn.0040268c
push 0x404c50
push dword [0x407114]
push 0x404c90
push dword [0x4096a4]
push 0x404ca4
push dword [ebp - 0x14]
lea eax, [ebp - 0x11c]
mov edx, 6
call fcn.00402770
mov eax, dword [ebp - 0x11c]
lea edx, [ebp - 8]
call fcn.00403cec
cmp dword [ebp - 8], 0
je 0x404c0d
mov eax, dword [ebp - 8]
mov edx, 0x404cb0
call fcn.004027f4
je 0x404c0d
lea ecx, [ebp - 0xc]
lea eax, [ebp - 8]
mov dl, 0xa
call fcn.004038c8
lea ecx, [ebp - 0x10]
lea eax, [ebp - 8]
mov dl, 0xa
call fcn.004038c8
jmp 0x404a98
push 0xa
call sub.KERNEL32.DLL_TlsGetValue
mov eax, dword [ebp - 0x10]
mov edx, dword [0x40885c]
call fcn.004027f4
je 0x404ab1
cmp dword [0x4070f4], 0
jg 0x404a91
push 0x40968c
call fcn.0040308c
xor eax, eax
mov dword [0x408860], eax
xor eax, eax
mov dword [0x408864], eax
mov eax, 0x40885c
mov edx, dword [ebp - 0x10]
call fcn.00402584
lea ecx, [ebp - 0x120]
lea eax, [ebp - 8]
mov dl, 0xa
call fcn.004038c8
mov edx, dword [ebp - 0x120]
mov eax, 0x408854
call fcn.00402584
mov eax, 0x408858
mov edx, dword [ebp - 8]
call fcn.00402584
lea ecx, [ebp - 0x124]
lea eax, [ebp - 0xc]
mov dl, 0x2c
call fcn.004038c8
mov edx, dword [ebp - 0x124]
mov eax, 0x409678
call fcn.00402584
xor eax, eax
mov dword [ebp - 0x18], eax
lea ecx, [ebp - 0x128]
lea eax, [ebp - 0xc]
mov dl, 0x2c
call fcn.004038c8
mov edx, dword [ebp - 0x128]
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x408868]
call fcn.00402584
lea ecx, [ebp - 0x12c]
lea eax, [ebp - 0xc]
mov dl, 0x2c
call fcn.004038c8
mov edx, dword [ebp - 0x12c]
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*2]
lea eax, [eax*4 + 0x40886c]
call fcn.00402584
mov eax, 0x4096a4
mov edx, dword [ebp - 0x18]
lea edx, [edx + edx*2]
mov edx, dword [edx*4 + 0x40886c]
call fcn.00402584
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*2]
cmp dword [eax*4 + 0x408868], 0
je 0x404baf
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*2]
cmp dword [eax*4 + 0x40886c], 0
jne 0x404bb3
xor eax, eax
jmp 0x404bb5
mov al, 1
and eax, 0x7f
mov edx, dword [ebp - 0x18]
lea edx, [edx + edx*2]
mov dword [edx*4 + 0x408870], eax
mov eax, dword [ebp - 0x18]
lea eax, [eax + eax*2]
cmp dword [eax*4 + 0x408870], 0
je 0x404beb
inc dword [0x408860]
inc dword [ebp - 0x18]
cmp dword [ebp - 0x18], 0x12c
jne 0x404b28
cmp dword [0x408860], 0
setg byte [ebp - 1]
cmp byte [ebp - 1], 0
je 0x404c03
mov byte [0x407104], 0
push 0x40968c
call sub.KERNEL32.DLL_GetModuleHandleA
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x404c3f
lea eax, [ebp - 0x12c]
mov edx, 5
call fcn.00402554
lea eax, [ebp - 0x14]
mov edx, 4
call fcn.00402554
ret