Function at 0x40c740
Capabilities:
Get thread local storage value

Disassembly:
push ebp
push edi
push esi
mov esi, edx
push ebx
mov ebx, ecx
sub esp, 0x3c
mov ebp, dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, dword [0x49c308]
call ebp
mov dword [esp + 0x14], eax
mov eax, dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [esp], edi
mov dword [esp + 0x10], eax
call eax
mov ecx, dword [sym.imp.KERNEL32.dll_SetLastError]
sub esp, 4
mov edi, eax
mov edx, dword [esp + 0x14]
mov dword [esp + 0x14], ecx
mov dword [esp], edx
call ecx
add dword [edi + 0x50], 1
mov edi, dword [0x49c308]
sub esp, 4
call ebp
mov dword [esp], edi
mov dword [esp + 0x18], eax
mov eax, dword [esp + 0x10]
call eax
sub esp, 4
mov edi, eax
mov edx, dword [esp + 0x18]
mov ecx, dword [esp + 0x14]
mov dword [esp], edx
call ecx
lea ecx, [edi + 0x54]
mov edx, 0x110
sub esp, 4
call fcn.00404070
lea edx, [eax + 8]
lea edi, [eax + 0xc]
mov dword [eax + 8], 0
and edi, 0xfffffffc
mov ecx, edx
mov dword [eax + 4], 1
mov dword [eax + 0x10c], 0
sub ecx, edi
xor eax, eax
add ecx, 0x108
shr ecx, 2
rep stosd dword es:[edi], eax
lea eax, [esp + 0x2c]
mov dword [edx + 4], 0x1f
mov ecx, ebx
mov dword [esp + 4], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x2c], edx
mov edx, esi
mov dword [esp], eax
call 0x40c230
mov ebx, dword [0x49c308]
sub esp, 8
mov esi, dword [esp + 0x2c]
call ebp
mov dword [esp], ebx
mov edi, eax
mov eax, dword [esp + 0x10]
call eax
sub esp, 4
mov ebx, eax
mov dword [esp], edi
mov edi, dword [esp + 0x14]
call edi
lea edx, [esi - 8]
lea ecx, [ebx + 0x54]
sub esp, 4
call fcn.00404df0
mov esi, dword [0x49c308]
call ebp
mov ebx, eax
mov dword [esp], esi
mov eax, dword [esp + 0x10]
call eax
sub esp, 4
mov esi, eax
mov dword [esp], ebx
call edi
mov eax, dword [esi + 0x50]
sub esp, 4
test eax, eax
jle 0x40c888
sub eax, 1
mov dword [esi + 0x50], eax
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov eax, 0x49c640
call fcn.00408500
mov dword [eax], 0x49c660
mov ebx, dword [eax + 0xc]
mov edi, eax
mov dword [eax + 8], str.AssertionDefect
mov dword [esp + 4], 0x44
mov dword [esp], 0x472020
call fcn.004081c0
mov dword [eax + 4], 0x3b
mov dword [eax], 0x3b
mov dword [eax + 8], 0x20495041
mov dword [eax + 0xc], 0x67617375
mov dword [eax + 0x10], 0x72652065
mov dword [eax + 0x14], 0x3a726f72
mov dword [eax + 0x18], 0x5f434720
mov dword [eax + 0x1c], 0x62616e65
mov dword [eax + 0x20], 0x6320656c
mov dword [eax + 0x24], 0x656c6c61
mov dword [eax + 0x28], 0x75622064
mov dword [eax + 0x2c], 0x43472074
mov dword [eax + 0x30], 0x20736920
mov dword [eax + 0x34], 0x65726c61
mov dword [eax + 0x38], 0x20796461
mov dword [eax + 0x3c], 0x62616e65
mov dword [eax + 0x40], 0x64656c
mov dword [edi + 0xc], eax
test ebx, ebx
je 0x40c94e
mov eax, dword [ebx - 8]
lea edx, [ebx - 8]
mov dword [esp + 0x18], edx
sub eax, 8
mov dword [ebx - 8], eax
cmp eax, 7
jbe 0x40c9f0
mov eax, dword [edi + 4]
test eax, eax
je 0x40c96a
mov ebx, dword [eax - 8]
lea ecx, [eax - 8]
mov dword [esp + 0x18], ecx
lea edx, [ebx - 8]
mov dword [eax - 8], edx
cmp edx, 7
jbe 0x40c9b0
mov dword [edi + 4], 0
mov ecx, edi
mov edx, str.AssertionDefect
mov dword [esp + 8], 0x350
mov dword [esp + 4], str.gc.nim
mov dword [esp], str.GC_enable
call fcn.004099c0
mov eax, dword [esi + 0x50]
sub esp, 0xc
sub eax, 1
mov dword [esi + 0x50], eax
add esp, 0x3c
pop ebx
pop esi
pop edi
pop ebp
ret 4
mov ebx, dword [0x49c308]
call ebp
mov ebp, eax
mov dword [esp], ebx
mov eax, dword [esp + 0x10]
call eax
sub esp, 4
mov ebx, eax
mov dword [esp], ebp
mov eax, dword [esp + 0x14]
add ebx, 0x2c
call eax
sub esp, 4
mov ecx, dword [esp + 0x18]
mov dword [esp], ebx
mov dword [esp + 4], ecx
call fcn.00405190
jmp 0x40c96a
mov ebx, dword [0x49c308]
call ebp
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x10]
mov dword [esp], ebx
call eax
sub esp, 4
mov ebx, eax
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x14]
add ebx, 0x2c
mov dword [esp], ecx
call eax
sub esp, 4
mov edx, dword [esp + 0x18]
mov dword [esp], ebx
mov dword [esp + 4], edx
call fcn.00405190
jmp 0x40c94e