Function at 0x4050c0
Capabilities:
Get thread local storage value
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x18c
mov eax, dword [0x452004]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
push dword [0x453c5c]
mov dword [ebp - 8], 0
mov dword [ebp - 0x120], 0
mov dword [ebp - 0x1c], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x14], 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x10], eax
lea eax, [ebp - 0x120]
push eax
push dword [0x453c5c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov edi, edi
test eax, eax
je 0x40543e
mov esi, dword [0x453ab0]
test byte [esi], 1
je 0x40516f
lea edi, [esi + 0x10]
push edi
call dword [sym.imp.ntdll.dll_RtlInterlockedPopEntrySList]
lea ecx, [ecx]
test eax, eax
je 0x405151
lock dec dword [edi + 8]
add eax, 8
mov byte [eax + 2], 2
jmp 0x405183
mov eax, dword [edi + 0x10]
add eax, 8
push eax
push 4
push dword [0x453afc]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
add eax, 8
mov byte [eax + 2], 2
jmp 0x405183
push 0x74
push 4
push dword [0x453afc]
call dword [sym.imp.ntdll.dll_RtlAllocateHeap]
mov byte [eax + 2], 0
lock inc dword ds:[esi + 4]
mov dword [eax + 4], 1
movzx ecx, byte [esi + 2]
lea esi, [eax + 8]
push 0x6c
push 0
push esi
mov word [eax], cx
call fcn.00415060
add esp, 0xc
push 0xc
call dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0xb
call dword [sym.imp.USER32.dll_GetSystemMetrics]
sub esp, 0xc
call fcn.0040fde0
push 0x32
mov dword [esi + 8], eax
call dword [sym.imp.USER32.dll_GetSystemMetrics]
push 0x31
call dword [sym.imp.USER32.dll_GetSystemMetrics]
sub esp, 0xc
call fcn.0040fde0
cmp dword [0x452a50], 0x3f
mov dword [esi + 4], eax
jb 0x405293
lea eax, [ebp - 0x188]
mov edx, 0x3c
push eax
call fcn.00407f40
test eax, eax
js 0x405293
mov ebx, dword [ebp - 0x188]
movzx eax, word [ebx]
test ax, ax
jne 0x405238
lea esp, [esp]
call fcn.0040a520
push ebx
push 0
push dword [0x453afc]
mov edi, eax
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x4052aa
mov ecx, dword [ebx + 4]
mov edx, dword [0x453ac4]
mov dword [ebp - 0x184], ecx
lea ecx, [eax + 0xa]
mov dword [ebp - 0x188], eax
call fcn.00409c00
mov ecx, dword [ebp - 0x188]
mov edi, eax
lea eax, [edi + 8]
xor edx, edx
mov dword [edi + 4], eax
mov dword [edi], ecx
mov word [eax + ecx], dx
mov eax, dword [ebp - 0x184]
test eax, eax
je 0x405282
push ecx
push eax
push dword [edi + 4]
call fcn.00415e30
add esp, 0xc
push ebx
push 0
push dword [0x453afc]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
jmp 0x4052aa
lea eax, [ebp - 0x184]
push eax
call fcn.00407fe0
nop
test eax, eax
js 0x4052c8
mov edi, dword [ebp - 0x184]
push esi
sub esp, 0xc
mov ecx, edi
call fcn.0040be20
lea ecx, [edi - 8]
or eax, 0xffffffff
lock xadd dword [ecx + 4], eax
dec eax
jne 0x4052c8
call fcn.00409ce0
mov eax, dword [esi + 0x18]
test eax, eax
je 0x4052d4
cmp dword [eax], 0
jne 0x4052dc
call fcn.00406360
mov dword [esi + 0x18], eax
push 0x60
lea eax, [ebp - 0x180]
push 0
push eax
call fcn.00415060
mov eax, dword [0x453ac8]
add esp, 0xc
mov dword [ebp - 0x178], eax
lea eax, [ebp - 8]
mov dword [ebp - 0x180], 0x60
mov dword [ebp - 0x174], 0x8008
push eax
push 0
push 0
lea eax, [ebp - 0x180]
mov dword [ebp - 0x160], str.Initializing...
push eax
mov dword [ebp - 0x12c], 0x404f00
mov dword [ebp - 0x128], esi
call dword [sym.imp.COMCTL32.dll_Ordinal_345]
cmp dword [ebp - 8], 0
je 0x40534a
mov ecx, esi
call fcn.00406de0
mov edi, dword [ebp - 0x120]
xor esi, esi
test edi, edi
je 0x40537f
jmp 0x405360
mov ecx, dword [ebp + esi*4 - 0x11c]
or eax, 0xffffffff
add ecx, 0xfffffff8
lock xadd dword [ecx + 4], eax
dec eax
jne 0x40537a
call fcn.00409ce0
inc esi
cmp esi, edi
jb 0x405360
mov edi, dword [ebp - 0x14]
mov dword [ebp - 0x120], 0
test edi, edi
je 0x4053ed
mov ebx, dword [ebp - 0x1c]
xor esi, esi
test ebx, ebx
je 0x4053be
lea esp, [esp]
mov ecx, dword [edi + esi*4]
or eax, 0xffffffff
add ecx, 0xfffffff8
lock xadd dword [ecx + 4], eax
dec eax
jne 0x4053b6
call fcn.00409ce0
inc esi
cmp esi, ebx
jb 0x4053a0
mov edi, dword [ebp - 0x14]
cmp dword [ebp - 0x18], 0x100
mov dword [ebp - 0x1c], 0
jbe 0x4053ed
push edi
push 0
push dword [0x453afc]
mov dword [ebp - 0x18], 0
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov dword [ebp - 0x14], 0
push dword [0x453c5c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
lea ecx, ds:[ebp - 0x120]
cmp eax, ecx
jne 0x40543e
push dword [ebp - 0x10]
push dword [0x453c5c]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
test eax, eax
je 0x40543e
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x40542d
push eax
push 0
push dword [0x453afc]
call dword [sym.imp.ntdll.dll_RtlFreeHeap]
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.00413aae
mov esp, ebp
pop ebp
ret
push 0xc0000001
call dword [sym.imp.ntdll.dll_RtlRaiseStatus]
int3