Function at 0x420584
Capabilities:
Get thread local storage value

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffff0
push ebx
push esi
push edi
mov eax, dword [0x54d750]
push eax
call sub.KERNEL32.DLL_TlsGetValue
mov dword [ebp - 4], 1
mov edi, eax
mov eax, dword [ebp + 8]
add eax, eax
mov dword [ebp - 8], eax
jmp 0x4207c7
mov ebx, dword [ebp - 8]
mov eax, dword [edi]
neg ebx
mov edx, dword [eax + ebx*4]
mov dword [ebp - 0xc], edx
mov ecx, dword [ebp - 0xc]
push ecx
call fcn.00420548
mov edx, dword [edi]
pop ecx
mov eax, dword [ebp - 8]
neg eax
mov ecx, dword [edx + ebx*4 + 4]
mov dword [ebp - 0x10], ecx
mov eax, dword [ebp - 0x10]
push eax
mov edx, dword [ebp - 0xc]
mov ecx, dword [edx + 8]
add ecx, 0x30
push ecx
call fcn.0043ee8c
add esp, 8
mov eax, dword [ebp - 0x10]
push eax
call fcn.0043f250
pop ecx
mov esi, eax
push esi
mov eax, dword [ebp - 0xc]
mov edx, dword [eax + 8]
add edx, 0x18
push edx
call fcn.0043f03c
add esp, 8
mov ecx, dword [ebp - 0xc]
mov ebx, dword [ecx + 8]
test byte [ebx + 1], 0x20
je 0x42061d
push ebx
call fcn.0043f598
pop ecx
mov ebx, eax
test dword [esi], 0xb405
je 0x42062c
push esi
call fcn.0043edc0
pop ecx
mov dword [esi], 0x12000
xor ecx, ecx
mov eax, dword [ebp - 0xc]
mov edx, dword [eax + 8]
mov dword [esi + 8], edx
mov dword [esi + 0xc], ecx
test byte [ebx + 1], 0x80
je 0x4206ff
mov eax, dword [ebx + 8]
cmp word [eax + 0xc], 0
je 0x4206ff
push 0x19
push ebx
call fcn.0042d58c
add esp, 8
test eax, eax
je 0x4206ff
xor edx, edx
mov dword [esi + 0x10], edx
push 0
call fcn.0043d7dc
pop ecx
mov dword [esi + 0xc], eax
call fcn.00422ba8
cmp dword [ebp + 0xc], 0
sete cl
and ecx, 1
push ecx
call fcn.00422bd0
pop ecx
mov eax, dword [edi]
mov edx, dword [eax - 4]
push edx
mov ecx, dword [ebp - 0x10]
push ecx
push ebx
mov eax, dword [eax - 8]
push eax
push 0x19
call fcn.0042d5d0
add esp, 0x14
sub dword [edi], 4
mov edx, dword [edi]
mov eax, dword [edx]
test dword [eax], 0xb405
je 0x4206c0
push eax
call fcn.0043edc0
pop ecx
call fcn.00425334
test ax, ax
jne 0x4206d3
call fcn.00423960
test eax, eax
jne 0x4206dd
xor edx, edx
mov dword [ebp - 4], edx
jmp 0x4207d7
push 0x1a
push ebx
call fcn.0042d58c
add esp, 8
test eax, eax
jne 0x4207c3
mov ecx, dword [esi + 0xc]
push ecx
call fcn.0043d978
pop ecx
xor eax, eax
mov dword [esi + 0xc], eax
test byte [ebx + 1], 0x80
je 0x420732
cmp dword [ebp + 0xc], 0
jle 0x420712
mov edx, 1
jmp 0x420718
mov ecx, dword [ebx + 8]
mov edx, dword [ecx + 4]
mov dword [esi + 0x10], edx
mov eax, dword [ebx + 8]
cmp dword [eax + 4], 0
jne 0x4207c3
xor ecx, ecx
mov dword [ebp - 4], ecx
jmp 0x4207c3
test byte [ebx], 4
je 0x42075b
push ebx
call fcn.0043ca74
cmp dword [ebp + 0xc], 0
pop ecx
jle 0x42074b
mov edx, 1
jmp 0x42074d
mov edx, eax
mov dword [esi + 0x10], edx
test eax, eax
jne 0x4207c3
xor eax, eax
mov dword [ebp - 4], eax
jmp 0x4207c3
test byte [ebx + 1], 4
je 0x42079a
cmp dword [ebp + 0xc], 0
jle 0x42076e
mov ecx, 1
jmp 0x420771
mov ecx, dword [ebx + 8]
mov dword [esi + 0x10], ecx
cmp dword [ebx + 8], 0
je 0x420793
push 1
mov eax, dword [ebx + 0x10]
add eax, dword [esi + 0x10]
dec eax
push eax
push 0
call fcn.0043daa0
add esp, 0xc
mov dword [esi + 0xc], eax
jmp 0x4207c3
xor edx, edx
mov dword [ebp - 4], edx
jmp 0x4207c3
call fcn.00425334
test ax, ax
jne 0x4207c3
push ebx
push 1
push 0x2e
call fcn.0046bdb8
pop ecx
push eax
push 0
push 0x42c
push 1
call fcn.00456f18
add esp, 0x18
jmp 0x4207eb
sub dword [ebp - 8], 2
cmp dword [ebp - 8], 0
jle 0x4207d7
cmp dword [ebp - 4], 0
jne 0x4205ae
mov eax, dword [ebp + 8]
push eax
call fcn.00422d18
pop ecx
mov edx, dword [ebp - 4]
push edx
call fcn.00422bd0
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret