Function at 0x1004ead0
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x494
push ebx
push esi
mov esi, dword [edx + 0x1b42c]
lea ebx, [edx + 0x1b430]
mov dword [ebp - 4], edx
mov dword [ebp - 8], ecx
push edi
mov edi, dword [edx + 0x1b428]
cmp esi, 1
jae 0x1004eb1b
lea esp, [esp]
mov ecx, ebx
call fcn.1004f8d0
movzx eax, word [ebx]
mov ecx, esi
mov edx, dword [ebp - 4]
add esi, 8
shl eax, cl
or edi, eax
cmp esi, 1
jb 0x1004eb00
mov ecx, dword [ebp - 8]
mov eax, edi
and eax, 1
shr edi, 1
dec esi
mov dword [ecx], eax
cmp esi, 2
jae 0x1004eb4b
lea ecx, [ecx]
mov ecx, ebx
call fcn.1004f8d0
movzx eax, word [ebx]
mov ecx, esi
mov edx, dword [ebp - 4]
add esi, 8
shl eax, cl
or edi, eax
cmp esi, 2
jb 0x1004eb30
mov ecx, dword [ebp - 4]
lea eax, [esi - 2]
mov edx, edi
shr edi, 2
and edx, 3
mov dword [ecx + 0x1b428], edi
mov dword [ecx + 0x1b42c], eax
cmp edx, 2
jne 0x1004eb76
call fcn.1004e590
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
test edx, edx
jne 0x1004ece5
push dword [0x100c7608]
mov dword [ebp - 8], edx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x1004eb9f
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov esi, dword [edi + 0x1b42c]
mov ecx, esi
mov ebx, dword [edi + 0x1b428]
and ecx, 7
mov eax, dword [edi + 0x1b420]
sub esi, ecx
shr ebx, cl
mov dword [ebp - 4], eax
cmp esi, 0x10
jae 0x1004ebf4
lea eax, [edi + 0x1b430]
jmp 0x1004ebd0
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 0x10
jb 0x1004ebd0
movzx ecx, bx
sub esi, 0x10
shr ebx, 0x10
mov dword [ebp - 0xc], ecx
cmp esi, 0x10
jae 0x1004ec37
lea eax, [edi + 0x1b430]
jmp 0x1004ec10
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 0x10
jb 0x1004ec10
mov ecx, dword [ebp - 0xc]
mov eax, ebx
not eax
movzx eax, ax
cmp ecx, eax
jne 0x1004eb93
shr ebx, 0x10
sub esi, 0x10
cmp dword [edi + 4], 0
jne 0x1004ecc6
mov eax, ecx
dec ecx
mov dword [ebp - 0xc], ecx
test eax, eax
je 0x1004ecc6
cmp esi, 8
jae 0x1004ec8b
lea eax, [edi + 0x1b430]
mov edx, edi
mov ecx, eax
call fcn.1004f8d0
movzx eax, word [edi + 0x1b430]
mov ecx, esi
shl eax, cl
add esi, 8
or ebx, eax
lea eax, [edi + 0x1b430]
cmp esi, 8
jb 0x1004ec67
mov eax, dword [ebp - 4]
mov byte [eax + edi + 0x8344], bl
inc eax
mov dword [ebp - 4], eax
cmp eax, 0x10000
jne 0x1004ecb7
mov edx, edi
mov ecx, eax
call fcn.1004e110
mov dword [ebp - 8], eax
test eax, eax
jne 0x1004f062
mov dword [ebp - 4], eax
mov ecx, dword [ebp - 0xc]
sub esi, 8
shr ebx, 8
cmp dword [edi + 4], 0
je 0x1004ec52
mov ecx, dword [ebp - 4]
mov eax, dword [ebp - 8]
mov dword [edi + 0x1b420], ecx
mov dword [edi + 0x1b428], ebx
mov dword [edi + 0x1b42c], esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp edx, 1
jne 0x1004f05d
push dword [0x100c7608]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov ebx, eax
test ebx, ebx
jne 0x1004ed0e
mov edi, 1
mov eax, edi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp dword [ebx + 0x18358], 0
jne 0x1004f032
mov eax, 8
mov dword [ebx + 0x18360], 7
mov ecx, 0x90
lea edi, [ebp - 0x490]
rep stosd dword es:[edi], eax
mov eax, 9
lea edi, [ebp - 0x250]
mov ecx, 0x70
mov edx, 0x120
rep stosd dword es:[edi], eax
lea eax, [ebp - 0x90]
mov dword [eax], 7
lea ecx, [ebp - 0x490]
mov dword [eax + 4], 7
mov dword [eax + 8], 7
mov dword [eax + 0xc], 7
mov dword [eax + 0x10], 7
mov dword [eax + 0x14], 7
mov dword [eax + 0x18], 7
mov dword [eax + 0x1c], 7
mov dword [eax + 0x20], 7
mov dword [eax + 0x24], 7
mov dword [eax + 0x28], 7
mov dword [eax + 0x2c], 7
mov dword [eax + 0x30], 7
mov dword [eax + 0x34], 7
mov dword [eax + 0x38], 7
mov dword [eax + 0x3c], 7
mov dword [eax + 0x40], 7
mov dword [eax + 0x44], 7
mov dword [eax + 0x48], 7
mov dword [eax + 0x4c], 7
mov dword [eax + 0x50], 7
mov dword [eax + 0x54], 7
mov dword [eax + 0x58], 7
mov dword [eax + 0x5c], 7
lea eax, [ebp - 0x30]
mov dword [eax], 8
mov dword [eax + 4], 8
mov dword [eax + 8], 8
mov dword [eax + 0xc], 8
mov dword [eax + 0x10], 8
mov dword [eax + 0x14], 8
mov dword [eax + 0x18], 8
mov dword [eax + 0x1c], 8
lea eax, [ebx + 0x18360]
push eax
lea eax, [ebx + 0x18358]
push eax
push 0x100c2cf0
push 0x100c2d70
push 0x101
call fcn.1004dc80
mov edi, eax
add esp, 0x14
test edi, edi
je 0x1004ee77
mov dword [ebx + 0x18358], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea esi, [ebx + 0x18364]
mov dword [ebp - 0x490], 5
push esi
lea eax, [ebx + 0x1835c]
mov dword [ebp - 0x48c], 5
push eax
push 0x100c2cb0
push 0x100c2d30
push 0
mov edx, 0x20
mov dword [ebp - 0x488], 5
lea ecx, [ebp - 0x490]
mov dword [ebp - 0x484], 5
mov dword [ebp - 0x480], 5
mov dword [ebp - 0x47c], 5
mov dword [ebp - 0x478], 5
mov dword [ebp - 0x474], 5
mov dword [ebp - 0x470], 5
mov dword [ebp - 0x46c], 5
mov dword [ebp - 0x468], 5
mov dword [ebp - 0x464], 5
mov dword [ebp - 0x460], 5
mov dword [ebp - 0x45c], 5
mov dword [ebp - 0x458], 5
mov dword [ebp - 0x454], 5
mov dword [ebp - 0x450], 5
mov dword [ebp - 0x44c], 5
mov dword [ebp - 0x448], 5
mov dword [ebp - 0x444], 5
mov dword [ebp - 0x440], 5
mov dword [ebp - 0x43c], 5
mov dword [ebp - 0x438], 5
mov dword [ebp - 0x434], 5
mov dword [ebp - 0x430], 5
mov dword [ebp - 0x42c], 5
mov dword [ebp - 0x428], 5
mov dword [ebp - 0x424], 5
mov dword [ebp - 0x420], 5
mov dword [ebp - 0x41c], 5
mov dword [ebp - 0x418], 5
mov dword [ebp - 0x414], 5
mov dword [esi], 5
call fcn.1004dc80
mov edi, eax
add esp, 0x14
cmp edi, 1
jle 0x1004f038
mov eax, dword [ebx + 0x18358]
test eax, eax
je 0x1004f015
jmp 0x1004f000
mov esi, dword [eax - 4]
sub eax, 8
push eax
call fcn.10086818
add esp, 4
mov eax, esi
test esi, esi
jne 0x1004f000
mov dword [ebx + 0x18358], 0
mov eax, edi
mov dword [ebx + 0x1835c], 0
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea esi, [ebx + 0x18364]
push dword [esi]
mov edx, dword [ebx + 0x1835c]
push dword [ebx + 0x18360]
mov ecx, dword [ebx + 0x18358]
call fcn.1004e1a0
add esp, 8
mov edi, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, 2
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret