Function at 0x40ac91
Capabilities:
Get thread local storage value
Print debug messages
Set thread local storage value

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x427730
push 0x413c58
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ecx
mov eax, 0x204c
call fcn.00414900
mov eax, dword [0x431d24]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov ebx, ecx
mov dword [ebp - 0x2038], ebx
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x2030], eax
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x203c], eax
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x2050], eax
xor edi, edi
cmp dword [ebp + 0x18], edi
je 0x40ad16
push dword [0x431928]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov ecx, ebx
call fcn.0040abb8
push esi
push dword [0x431928]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp dword [ebx + 0x28], edi
jne 0x40ad24
cmp dword [ebx + 0x2c], edi
je 0x40b15c
mov esi, dword [ebp + 8]
cmp esi, dword [ebx + 0x30]
jl 0x40b15c
mov word [ebp - 0x201c], di
mov ecx, 0x7ff
xor eax, eax
lea edi, [ebp - 0x201a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
and word [ebp - 0x204c], 0
xor eax, eax
lea edi, [ebp - 0x204a]
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosd dword es:[edi], eax
stosw word es:[edi], ax
cmp dword [0x4337dc], 0
jne 0x40ad71
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x4337dc], eax
lea eax, [ebp - 0x204c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
lea eax, [ebx + 0xf0]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
push dword [0x4337dc]
movzx eax, word [ebp - 0x203e]
push eax
movzx eax, word [ebp - 0x2040]
push eax
movzx eax, word [ebp - 0x2042]
push eax
movzx eax, word [ebp - 0x2044]
push eax
push ecx
push str._08d_t_02d:_02d:_02d._03d_t__d_
mov edi, 0x100
push edi
lea eax, [ebp - 0x201c]
push eax
call fcn.00413b3d
add esp, 0x24
lea ebx, [ebp + eax*2 - 0x201c]
mov dword [ebp - 0x202c], ebx
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push str.__d_
push edi
push ebx
call fcn.00413b3d
add esp, 0x10
lea ebx, [ebx + eax*2]
mov eax, esi
xor esi, esi
sub eax, esi
je 0x40ae5e
dec eax
je 0x40ae51
dec eax
je 0x40ae44
dec eax
je 0x40ae37
dec eax
je 0x40ae2a
dec eax
je 0x40ae1d
dec eax
jne 0x40b15c
call fcn.004016cc
push eax
push str.PROMPT___s_
jmp 0x40ae69
call fcn.004016cc
push eax
push str.FATAL____s_
jmp 0x40ae69
call fcn.004016cc
push eax
push str.ERROR____s_
jmp 0x40ae69
call fcn.004016cc
push eax
push str.WARN_____s_
jmp 0x40ae69
call fcn.004016cc
push eax
push str.INFO_____s_
jmp 0x40ae69
call fcn.004016cc
push eax
push str.DEBUG____s_
jmp 0x40ae69
call fcn.004016cc
push eax
push str.TRACE____s_
push edi
push ebx
call fcn.00413b3d
add esp, 0x10
lea ebx, [ebx + eax*2]
mov dword [ebp - 0x2024], ebx
mov dword [ebp - 0x2020], esi
mov word [ebx], 0x5b
mov dword [ebp - 4], esi
cmp dword [ebp + 0x18], esi
je 0x40ae9d
push dword [0x431928]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
jmp 0x40ae9f
xor eax, eax
mov dword [ebp - 0x2034], eax
cmp dword [ebp + 0x18], esi
je 0x40aeb8
push dword [0x431924]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
jmp 0x40aeba
xor eax, eax
mov dword [ebp - 0x2020], eax
cmp dword [ebp - 0x2034], esi
jne 0x40aed0
mov dword [ebp - 0x2054], esi
jmp 0x40aef9
push dword [ebp - 0x2034]
call fcn.0041391d
mov esi, eax
mov dword [ebp - 0x2054], esi
lea eax, [esi + esi]
push eax
push dword [ebp - 0x2034]
lea eax, [ebx + 2]
push eax
call fcn.004132a0
add esp, 0x10
or dword [ebp - 4], 0xffffffff
jmp 0x40af33
mov word [ebx + esi*2 + 2], 0x5d
mov word [ebx + esi*2 + 4], 0x20
lea esi, [ebx + esi*2 + 6]
mov dword [ebp - 0x2024], esi
cmp dword [ebp - 0x2020], 0
je 0x40afdb
and dword [ebp - 0x2028], 0
mov dword [ebp - 4], 1
push 4
lea eax, [ebp - 0x2020]
push eax
lea eax, [ebp - 0x2028]
push eax
call fcn.004132a0
add esp, 0xc
or dword [ebp - 4], 0xffffffff
jmp 0x40afa1
mov word [esi], 0x5b
push dword [ebp - 0x2028]
push str.0x_08x
push edi
lea eax, [esi + 2]
push eax
call fcn.00413b3d
push esi
call fcn.0041391d
add esp, 0x14
mov word [esi + eax*2], 0x5d
mov word [esi + eax*2 + 2], 0x20
lea esi, [esi + eax*2 + 4]
mov dword [ebp - 0x2024], esi
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x201c]
mov eax, esi
sub eax, ecx
mov ecx, 0xfbf
sar eax, 1
sub ecx, eax
cmp dword [ebp - 0x203c], 0
jne 0x40b012
push dword [ebp - 0x2030]
push 0x4245e8
push ecx
push esi
call fcn.00413b3d
jmp 0x40b025
push dword [ebp - 0x203c]
push dword [ebp - 0x2030]
push ecx
push esi
call fcn.004154c4
add esp, 0x10
mov dword [ebp - 0x205c], eax
jmp 0x40b078
or dword [ebp - 4], 0xffffffff
cmp eax, 0xffffffff
jne 0x40b088
push esi
call fcn.0041391d
pop ecx
lea esi, [esi + eax*2 - 2]
mov ax, word [esi]
cmp ax, 9
je 0x40b0a1
cmp ax, 0xd
je 0x40b0a1
cmp ax, 0xa
jne 0x40b0a9
and word [esi], 0
dec esi
dec esi
jmp 0x40b08c
rdtsc
mov dword [ebp - 0x2060], edx
inc esi
inc esi
push 0x427564
movzx ecx, ax
push ecx
shr eax, 0x10
push eax
push str._t_hu__hu_s
push 0x20
push esi
call fcn.00413b3d
add esp, 0x18
lea esi, [esi + eax*2]
mov edi, dword [ebp - 0x2038]
cmp dword [ebp + 8], 6
je 0x40b128
lea ecx, [edi + 0x34]
mov ebx, 0x426640
push ebx
call fcn.004080f4
test eax, eax
jne 0x40b103
push dword [ebp - 0x202c]
lea ecx, [edi + 0x34]
call fcn.004081ba
test eax, eax
je 0x40b15c
lea ecx, [edi + 0x88]
push ebx
call fcn.004080f4
test eax, eax
jne 0x40b15c
push dword [ebp - 0x202c]
lea ecx, [edi + 0x88]
call fcn.004081ba
test eax, eax
jne 0x40b15c
cmp dword [edi + 0x28], 0
je 0x40b13a
push dword [ebp - 0x202c]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [edi + 0x2c], 0
je 0x40b15c
push dword [ebp - 0x2050]
lea eax, [ebp - 0x201c]
sub esi, eax
sar esi, 1
push esi
push eax
push dword [ebp + 8]
mov ecx, edi
call fcn.0040832b
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x1c]
xor ecx, ebp
call fcn.00413d8f
leave
ret 0x14