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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x427740
push 0x414158
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ecx
mov eax, 0x204c
call fcn.00414e00
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 0x40adf5
push dword [0x431928]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov esi, eax
mov ecx, ebx
call fcn.0040ac97
push esi
push dword [0x431928]
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
cmp dword [ebx + 0x28], edi
jne 0x40ae03
cmp dword [ebx + 0x2c], edi
je 0x40b23b
mov esi, dword [ebp + 8]
cmp esi, dword [ebx + 0x30]
jl 0x40b23b
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 0x40ae50
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, pe_nt_image_headers32
push edi
lea eax, [ebp - 0x201c]
push eax
call fcn.0041403d
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.0041403d
add esp, 0x10
lea ebx, [ebx + eax*2]
mov eax, esi
xor esi, esi
sub eax, esi
je 0x40af3d
dec eax
je 0x40af30
dec eax
je 0x40af23
dec eax
je 0x40af16
dec eax
je 0x40af09
dec eax
je 0x40aefc
dec eax
jne 0x40b23b
call fcn.004016cc
push eax
push str.PROMPT___s_
jmp 0x40af48
call fcn.004016cc
push eax
push str.FATAL____s_
jmp 0x40af48
call fcn.004016cc
push eax
push str.ERROR____s_
jmp 0x40af48
call fcn.004016cc
push eax
push str.WARN_____s_
jmp 0x40af48
call fcn.004016cc
push eax
push str.INFO_____s_
jmp 0x40af48
call fcn.004016cc
push eax
push str.DEBUG____s_
jmp 0x40af48
call fcn.004016cc
push eax
push str.TRACE____s_
push edi
push ebx
call fcn.0041403d
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 0x40af7c
push dword [0x431928]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
jmp 0x40af7e
xor eax, eax
mov dword [ebp - 0x2034], eax
cmp dword [ebp + 0x18], esi
je 0x40af97
push dword [0x431924]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
jmp 0x40af99
xor eax, eax
mov dword [ebp - 0x2020], eax
cmp dword [ebp - 0x2034], esi
jne 0x40afaf
mov dword [ebp - 0x2054], esi
jmp 0x40afd8
push dword [ebp - 0x2034]
call fcn.00413e1d
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.004137a0
add esp, 0x10
or dword [ebp - 4], 0xffffffff
jmp 0x40b012
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 0x40b0ba
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.004137a0
add esp, 0xc
or dword [ebp - 4], 0xffffffff
jmp 0x40b080
mov word [esi], 0x5b
push dword [ebp - 0x2028]
push str.0x_08x
push edi
lea eax, [esi + 2]
push eax
call fcn.0041403d
push esi
call fcn.00413e1d
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 0x40b0f1
push dword [ebp - 0x2030]
push 0x4245f8
push ecx
push esi
call fcn.0041403d
jmp 0x40b104
push dword [ebp - 0x203c]
push dword [ebp - 0x2030]
push ecx
push esi
call fcn.004159c4
add esp, 0x10
mov dword [ebp - 0x205c], eax
jmp 0x40b157
or dword [ebp - 4], 0xffffffff
cmp eax, 0xffffffff
jne 0x40b167
push esi
call fcn.00413e1d
pop ecx
lea esi, [esi + eax*2 - 2]
mov ax, word [esi]
cmp ax, 9
je 0x40b180
cmp ax, 0xd
je 0x40b180
cmp ax, 0xa
jne 0x40b188
and word [esi], 0
dec esi
dec esi
jmp 0x40b16b
rdtsc
mov dword [ebp - 0x2060], edx
inc esi
inc esi
push 0x427574
movzx ecx, ax
push ecx
shr eax, 0x10
push eax
push str._t_hu__hu_s
push 0x20
push esi
call fcn.0041403d
add esp, 0x18
lea esi, [esi + eax*2]
mov edi, dword [ebp - 0x2038]
cmp dword [ebp + 8], 6
je 0x40b207
lea ecx, [edi + 0x34]
mov ebx, 0x426650
push ebx
call fcn.004081d3
test eax, eax
jne 0x40b1e2
push dword [ebp - 0x202c]
lea ecx, [edi + 0x34]
call fcn.00408299
test eax, eax
je 0x40b23b
lea ecx, [edi + 0x88]
push ebx
call fcn.004081d3
test eax, eax
jne 0x40b23b
push dword [ebp - 0x202c]
lea ecx, [edi + 0x88]
call fcn.00408299
test eax, eax
jne 0x40b23b
cmp dword [edi + 0x28], 0
je 0x40b219
push dword [ebp - 0x202c]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [edi + 0x2c], 0
je 0x40b23b
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.0040840a
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.0041428f
leave
ret 0x14