Function at 0x53c490
Capabilities:
Get thread local storage value

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x70
mov eax, dword [ebp + 8]
mov ecx, dword [eax + 0xaa78]
push ebx
push esi
mov esi, dword [ecx + 0x38]
and esi, 0xfffff
push edi
mov dword [ebp - 0x38], ecx
mov dword [ebp - 0x20], esi
je 0x53c752
mov eax, dword [ecx]
xor edx, edx
div esi
xor edx, edx
mov dword [ebp - 0x30], edx
cmp eax, edx
mov dword [ebp - 0x40], eax
jbe 0x53c752
mov dword [ebp - 0x24], edx
jmp 0x53c4d7
mov ecx, dword [ebp - 0x38]
mov edx, dword [ebp - 0x20]
or eax, 0xffffffff
xor esi, esi
mov dword [ebp - 0x50], eax
mov dword [ebp - 0x4c], eax
mov dword [ebp - 0x48], eax
mov dword [ebp - 0x44], eax
mov dword [ebp - 0xc], eax
mov dword [ebp - 0x14], eax
xor eax, eax
xor ebx, ebx
cmp edx, esi
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x10], esi
mov dword [ebp - 0x18], esi
mov dword [ebp - 0x1c], esi
mov dword [ebp - 0x28], eax
jbe 0x53c63b
mov ecx, dword [ecx + 4]
add ecx, dword [ebp - 0x24]
mov dword [ebp - 0x34], ecx
mov edi, dword [ecx]
mov ecx, dword [edi + 0x2c]
cmp ecx, 3
ja case.default.0x53c523
jmp dword [ecx*4 + 0x53ccd8]
mov ecx, dword [edi + 0x6c]
cmp ecx, 0xffffffff
je case.default.0x53c523
cmp dword [ebp - 0x2c], 0
jne case.default.0x53c523
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x2c], ecx
mov dword [ebp + ebx*4 - 0x50], ecx
mov dword [ebp + ebx*4 - 0x60], edi
mov dword [ebp + ebx*4 - 0x70], eax
jmp 0x53c61e
mov ecx, dword [edi + 0x6c]
cmp ecx, 0xffffffff
je case.default.0x53c523
test esi, esi
jne case.default.0x53c523
mov esi, ecx
mov dword [ebp - 0x10], esi
mov dword [ebp + ebx*4 - 0x50], esi
mov dword [ebp + ebx*4 - 0x60], edi
mov dword [ebp + ebx*4 - 0x70], eax
jmp 0x53c61e
or edx, 0xffffffff
cmp dword [ebp - 0xc], edx
jne case.default.0x53c523
mov ecx, dword [edi + 0x6c]
cmp ecx, edx
mov dword [ebp - 0xc], edi
mov dword [ebp + ebx*4 - 0x50], edx
mov dword [ebp + ebx*4 - 0x60], edi
mov dword [ebp + ebx*4 - 0x70], eax
je 0x53c61e
mov dword [ebp - 0x18], ecx
mov ecx, dword [ecx + 0x38]
and ecx, 0xfff00000
cmp ecx, 0x10000000
jne 0x53c5ca
mov esi, dword [ebp - 0x18]
call fcn.004ce9c0
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0xc], eax
mov eax, dword [ebp - 0x28]
jmp 0x53c61e
mov dword [ebp - 0x18], 0
jmp 0x53c61e
or edx, 0xffffffff
cmp dword [ebp - 0x14], edx
jne case.default.0x53c523
mov ecx, dword [edi + 0x6c]
cmp ecx, edx
mov dword [ebp - 0x14], edi
mov dword [ebp + ebx*4 - 0x50], edx
mov dword [ebp + ebx*4 - 0x60], edi
mov dword [ebp + ebx*4 - 0x70], eax
je 0x53c61e
mov edx, dword [ecx + 0x38]
and edx, 0xfff00000
cmp edx, 0x10000000
mov dword [ebp - 0x1c], ecx
jne 0x53c617
mov esi, ecx
call fcn.004ce9c0
mov esi, dword [ebp - 0x10]
mov dword [ebp - 0x14], eax
mov eax, dword [ebp - 0x28]
jmp 0x53c61e
mov dword [ebp - 0x1c], 0
add ebx, 1
mov ecx, dword [ebp - 0x34]
mov edx, dword [ebp - 0x20]
add eax, 1
add ecx, 4
cmp eax, edx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x34], ecx
jb 0x53c515
cmp ebx, edx
jne 0x53c736
cmp ebx, 1
jbe 0x53c736
xor dl, dl
test esi, esi
je 0x53c6a0
cmp dword [esi + 0x38], 0x20500001
jne 0x53c69e
mov edi, dword [ebp - 0xc]
cmp edi, 0xffffffff
je 0x53c671
mov eax, dword [esi + 4]
cmp edi, dword [eax]
je 0x53c671
cmp edi, dword [eax + 4]
je 0x53c671
mov dl, 1
mov ecx, dword [ebp - 0x14]
cmp ecx, 0xffffffff
je 0x53c6a0
mov eax, dword [esi + 4]
cmp ecx, dword [eax]
je 0x53c687
cmp ecx, dword [eax + 4]
je 0x53c687
mov dl, 1
cmp edi, 0xffffffff
je 0x53c6a0
cmp ecx, edi
mov ecx, dword [eax]
je 0x53c699
cmp ecx, dword [eax + 4]
jne 0x53c6a0
jmp 0x53c69e
cmp ecx, dword [eax + 4]
je 0x53c6a0
mov dl, 1
cmp dword [ebp - 0x2c], 0
je 0x53c6c8
mov eax, dword [ebp - 0x3c]
fld qword [eax + 0xa8]
mov eax, dword [eax + 8]
and eax, 0x800
xor ecx, ecx
or eax, ecx
je 0x53c734
fld1
fucompp
fnstsw ax
test ah, 0x44
jp 0x53c736
test dl, dl
jne 0x53c736
mov esi, dword [ebp - 0x20]
test esi, esi
mov dword [ebp - 0x2c], esi
mov byte [ebp - 5], dl
jbe 0x53c71a
mov edx, dword [ebp - 0x38]
mov eax, dword [edx + 4]
add eax, dword [ebp - 0x24]
mov edi, esi
cmp dword [ebp - 0x18], 0
mov ecx, dword [eax]
jne 0x53c6f2
cmp dword [ecx + 0x2c], 2
je 0x53c6fe
cmp dword [ebp - 0x1c], 0
jne 0x53c703
cmp dword [ecx + 0x2c], 3
jne 0x53c703
sub esi, 1
jmp 0x53c70f
mov ecx, dword [ecx + 0x7c]
cmp ecx, dword [edx + 0x10]
je 0x53c70f
mov byte [ebp - 5], 1
add eax, 4
sub edi, 1
jne 0x53c6e4
mov dword [ebp - 0x2c], esi
cmp esi, 2
jb 0x53c736
cmp byte [ebp - 5], 0
jne 0x53c736
mov eax, dword [0x776138]
xor edx, edx
cmp eax, edx
jge 0x53c760
xor eax, eax
jmp 0x53c769
fstp st(0)
mov eax, dword [ebp - 0x20]
mov ecx, dword [ebp - 0x30]
add eax, eax
add eax, eax
add dword [ebp - 0x24], eax
add ecx, 1
cmp ecx, dword [ebp - 0x40]
mov dword [ebp - 0x30], ecx
jb 0x53c4d4
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
xor edx, edx
cmp dword [eax + 0x10], edx
je 0x53c793
mov ecx, dword [eax + 0x10]
cmp ecx, edx
jne 0x53c77b
xor ecx, ecx
mov edi, ecx
jmp 0x53c7a3
mov edx, dword [ecx]
test edx, edx
mov dword [eax + 0x10], edx
jne 0x53c787
mov dword [eax + 0x14], edx
mov dword [ecx], 0xfefefefe
xor edx, edx
mov edi, ecx
jmp 0x53c7a3
mov ecx, dword [eax + 0xc]
push 0x10
push 0x40
call fcn.007515ae
mov edi, eax
xor edx, edx
cmp edi, edx
mov dword [ebp - 0x24], edi
je 0x53c82a
or eax, 0xffffffff
mov dword [edi + 0x10], eax
mov dword [edi + 0x20], eax
mov eax, esi
push 0
and eax, 0xfffff
mov dword [edi], edx
mov dword [edi + 8], edx
mov dword [edi + 0x38], edx
mov dword [edi + 4], edx
mov word [edi + 0x3c], dx
mov dword [edi + 0xc], edx
mov word [edi + 0x3e], dx
mov dword [edi + 0x14], edx
mov dword [edi + 0x18], edx
mov dword [edi + 0x1c], edx
mov dword [edi + 0x24], edx
mov dword [edi + 0x30], edx
mov dword [edi + 0x34], edx
lea ecx, [esi + esi]
or eax, 0x70900000
push edi
mov edx, esi
call fcn.004cc5e0
test eax, eax
mov dword [ebp - 0x40], eax
jge 0x53c838
mov ebx, edi
lea esi, [ebx + 4]
lea edi, [ebx + 0x3c]
call fcn.004cc530
lea esi, [ebx + 0xc]
lea edi, [ebx + 0x3e]
call fcn.004cc530
mov esi, ebx
call fcn.004ce8a0
mov eax, dword [ebp - 0x40]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov eax, 0x8007000e
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edx, dword [ebp + 8]
mov eax, dword [edx + 0xaa78]
mov ecx, dword [eax + 0x30]
mov dword [edi + 0x30], ecx
mov edx, dword [eax + 0x34]
xor eax, eax
test esi, esi
mov dword [edi + 0x34], edx
jbe 0x53c8c6
mov edx, dword [ebp - 0xc]
lea ecx, [esi*4]
lea ecx, [ecx]
mov esi, dword [ebp - 0x10]
test esi, esi
je 0x53c883
mov edx, dword [esi + 4]
mov edx, dword [edx]
mov esi, dword [edi + 4]
mov dword [esi + eax*4], edx
mov edx, dword [ebp - 0x10]
mov edx, dword [edx + 4]
mov esi, dword [edi + 4]
mov edx, dword [edx + 4]
mov dword [ecx + esi], edx
jmp 0x53c8b6
mov esi, dword [ebp - 0x14]
cmp esi, 0xffffffff
jne 0x53c8a1
cmp edx, esi
je 0x53c752
mov esi, dword [edi + 4]
mov dword [esi + eax*4], edx
mov esi, dword [edi + 4]
mov dword [ecx + esi], edx
jmp 0x53c8b9
cmp edx, 0xffffffff
jne 0x53c752
mov edx, dword [edi + 4]
mov dword [edx + eax*4], esi
mov edx, dword [edi + 4]
mov dword [ecx + edx], esi
mov edx, dword [ebp - 0xc]
mov esi, dword [ebp - 0x2c]
add eax, 1
add ecx, 4
cmp eax, esi
jb 0x53c860
xor edx, edx
xor ecx, ecx
test ebx, ebx
jbe 0x53c923
mov edi, edi
cmp dword [ebp - 0x18], 0
mov eax, dword [ebp + ecx*4 - 0x60]
jne 0x53c8e0
cmp dword [eax + 0x2c], 2
je 0x53c918
cmp dword [ebp - 0x1c], 0
jne 0x53c8ec
cmp dword [eax + 0x2c], 3
je 0x53c918
mov esi, dword [edi + 0xc]
mov dword [esi + edx*4], eax
mov esi, dword [ebp + 8]
mov esi, dword [esi + 0xaa78]
mov esi, dword [esi + 4]
add edx, 1
mov dword [ebp - 0x40], edx
mov edx, dword [ebp - 0x30]
imul edx, dword [ebp - 0x20]
add edx, dword [ebp + ecx*4 - 0x70]
mov dword [esi + edx*4], eax
mov esi, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x40]
cmp edx, esi
ja 0x53c97f
add ecx, 1
cmp ecx, ebx
jb 0x53c8d0
xor esi, esi
cmp dword [edi + 8], esi
mov dword [ebp - 0x30], esi
jbe 0x53ca85
mov ecx, 1
mov dword [ebp - 0x34], ecx
lea esp, [esp]
cmp ecx, dword [edi + 8]
jae 0x53ca70
lea esp, [esp]
mov eax, dword [edi + 0xc]
mov esi, dword [eax + esi*4]
mov edx, dword [eax + ecx*4]
mov dword [ebp - 0x38], esi
mov esi, dword [esi + 0x2c]
cmp esi, dword [edx + 0x2c]
mov dword [ebp - 0x40], edx
jbe 0x53ca53
mov esi, dword [ebp - 0x38]
mov dword [eax + ecx*4], esi
mov eax, dword [edi + 0xc]
mov esi, dword [ebp - 0x30]
mov dword [eax + esi*4], edx
jmp 0x53ca56
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0xaa78]
mov esi, dword [eax + 0x34]
push 0x4633f4
push 0x12da
call fcn.004f5fb0
mov esi, dword [ebp - 0x24]
add esp, 8
cmp word [esi + 0x3c], 0
je 0x53c9f0
mov eax, dword [0x776138]
test eax, eax
jge 0x53c9b4
xor eax, eax
jmp 0x53c9bb
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [esi + 0x3c]
cmp ecx, dword [eax + 0x120]
ja 0x53c9e3
mov edx, dword [esi + 4]
mov eax, dword [eax + 0x11c]
shl ecx, 4
test edx, edx
lea eax, [eax + ecx - 0x10]
je 0x53c9e3
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [eax + 4], edx
mov word [esi + 0x3c], 0
mov dword [esi + 4], 0
cmp word [esi + 0x3e], 0
je 0x53ca40
mov eax, dword [0x776138]
test eax, eax
jge 0x53ca04
xor eax, eax
jmp 0x53ca0b
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [esi + 0x3e]
cmp ecx, dword [eax + 0x120]
ja 0x53ca33
mov edx, dword [esi + 0xc]
mov eax, dword [eax + 0x11c]
shl ecx, 4
test edx, edx
lea eax, [eax + ecx - 0x10]
je 0x53ca33
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [eax + 4], edx
mov word [esi + 0x3e], 0
mov dword [esi + 0xc], 0
call fcn.004ce8a0
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov esi, dword [ebp - 0x30]
mov eax, dword [ebp - 0x38]
mov eax, dword [eax + 0x2c]
cmp eax, dword [edx + 0x2c]
je 0x53ca9c
add ecx, 1
cmp ecx, dword [edi + 8]
jb 0x53c950
mov ecx, dword [ebp - 0x34]
add esi, 1
add ecx, 1
cmp esi, dword [edi + 8]
mov dword [ebp - 0x30], esi
mov dword [ebp - 0x34], ecx
jb 0x53c940
mov eax, dword [ebp + 8]
cmp dword [eax + 0x10], 0
jbe 0x53cbb7
mov edx, dword [eax + 0x14]
mov edx, dword [edx]
jmp 0x53cbb9
mov edi, dword [ebp + 8]
mov ecx, dword [edi + 0xaa78]
mov esi, dword [ecx + 0x34]
push 0x461c6c
push 0x12db
call fcn.004f5fb0
mov esi, dword [ebp - 0x24]
add esp, 8
cmp word [esi + 0x3c], 0
je 0x53cb0d
mov eax, dword [0x776138]
test eax, eax
jge 0x53cad1
xor eax, eax
jmp 0x53cad8
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [esi + 0x3c]
cmp ecx, dword [eax + 0x120]
ja 0x53cb00
mov edx, dword [esi + 4]
mov eax, dword [eax + 0x11c]
shl ecx, 4
test edx, edx
lea eax, [eax + ecx - 0x10]
je 0x53cb00
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [eax + 4], edx
mov word [esi + 0x3c], 0
mov dword [esi + 4], 0
cmp word [esi + 0x3e], 0
je 0x53cb5d
mov eax, dword [0x776138]
test eax, eax
jge 0x53cb21
xor eax, eax
jmp 0x53cb28
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [esi + 0x3e]
cmp ecx, dword [eax + 0x120]
ja 0x53cb50
mov edx, dword [esi + 0xc]
mov eax, dword [eax + 0x11c]
shl ecx, 4
test edx, edx
lea eax, [eax + ecx - 0x10]
je 0x53cb50
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [eax + 4], edx
mov word [esi + 0x3e], 0
mov dword [esi + 0xc], 0
mov eax, dword [0x776138]
test eax, eax
jl 0x53cba9
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
je 0x53cba9
push 0x40
push 0xfe
push esi
call sub.msvcrt.dll_memset
mov dword [esi], 0
mov eax, dword [edi + 0x14]
add esp, 0xc
test eax, eax
je 0x53cba3
mov dword [eax], esi
mov dword [edi + 0x14], esi
mov eax, 0x80004005
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [edi + 0x10], esi
mov dword [edi + 0x14], esi
mov eax, 0x80004005
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor edx, edx
xor ecx, ecx
test ebx, ebx
jbe 0x53cbe4
nop
mov eax, dword [ebp + ecx*4 - 0x50]
cmp eax, 0xffffffff
je 0x53cbdd
mov esi, dword [edx + 0x10]
cmp esi, dword [eax + 0x10]
jae 0x53cbd3
mov edx, eax
xor esi, esi
mov dword [eax + 0x38], esi
mov dword [eax], esi
mov dword [eax + 8], esi
add ecx, 1
cmp ecx, ebx
jb 0x53cbc0
push edi
push edx
call fcn.004ccff0
xor ebx, ebx
cmp eax, ebx
jl 0x53c757
cmp word [edi + 0x3c], bx
je 0x53cc3e
mov eax, dword [0x776138]
cmp eax, ebx
jge 0x53cc08
xor eax, eax
jmp 0x53cc0f
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [edi + 0x3c]
cmp ecx, dword [eax + 0x120]
ja 0x53cc37
mov edx, dword [edi + 4]
mov eax, dword [eax + 0x11c]
shl ecx, 4
cmp edx, ebx
lea eax, [ecx + eax - 0x10]
je 0x53cc37
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [eax + 4], edx
mov word [edi + 0x3c], bx
mov dword [edi + 4], ebx
cmp word [edi + 0x3e], bx
je 0x53cc87
mov eax, dword [0x776138]
cmp eax, ebx
jge 0x53cc51
xor eax, eax
jmp 0x53cc58
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
movzx ecx, word [edi + 0x3e]
cmp ecx, dword [eax + 0x120]
ja 0x53cc80
mov edx, dword [edi + 0xc]
mov eax, dword [eax + 0x11c]
shl ecx, 4
cmp edx, ebx
lea eax, [ecx + eax - 0x10]
je 0x53cc80
mov ecx, dword [eax + 4]
mov dword [edx], ecx
mov dword [eax + 4], edx
mov word [edi + 0x3e], bx
mov dword [edi + 0xc], ebx
mov eax, dword [0x776138]
cmp eax, ebx
jl 0x53cccc
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
cmp esi, ebx
je 0x53cccc
push 0x40
push 0xfe
push edi
call sub.msvcrt.dll_memset
mov dword [edi], ebx
mov eax, dword [esi + 0x14]
add esp, 0xc
cmp eax, ebx
je 0x53ccc6
mov dword [eax], edi
mov dword [esi + 0x14], edi
xor eax, eax
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov dword [esi + 0x10], edi
mov dword [esi + 0x14], edi
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret 4