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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x418930
push 0x41321c
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
push ecx
push ecx
mov eax, 0x204c
call fcn.00413270
mov eax, dword [0x4241a4]
xor eax, ebp
mov dword [ebp - 0x1c], eax
push ebx
push esi
push edi
mov dword [ebp - 0x18], esp
mov esi, ecx
mov dword [ebp - 0x2038], esi
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 ebx, ebx
cmp dword [ebp + 0x18], ebx
je 0x4092cb
call fcn.0040918a
cmp dword [esi + 0x28], ebx
jne 0x4092d9
cmp dword [esi + 0x2c], ebx
je 0x409721
mov eax, dword [ebp + 8]
cmp eax, dword [esi + 0x30]
jl 0x409721
mov word [ebp - 0x201c], bx
mov ecx, 0x7ff
xor eax, eax
lea edi, [ebp - 0x201a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov word [ebp - 0x204c], bx
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 [0x425b94], ebx
jne 0x409324
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x425b94], eax
lea eax, [ebp - 0x204c]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
lea eax, [esi + 0xf0]
mov ecx, dword [eax]
lea edx, [ecx + 1]
mov dword [eax], edx
push dword [0x425b94]
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 ebx, 0x100
push ebx
lea eax, [ebp - 0x201c]
push eax
mov esi, dword [sym.imp.MSVCR71.dll__snwprintf]
call esi
add esp, 0x24
lea edi, [ebp + eax*2 - 0x201c]
mov dword [ebp - 0x202c], edi
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push str.__d_
push ebx
push edi
call esi
add esp, 0x10
lea edi, [edi + eax*2]
mov eax, dword [ebp + 8]
sub eax, 0
je 0x409411
dec eax
je 0x409404
dec eax
je 0x4093f7
dec eax
je 0x4093ea
dec eax
je 0x4093dd
dec eax
je 0x4093d0
dec eax
jne 0x409721
call fcn.00401af0
push eax
push str.PROMPT___s_
jmp 0x40941c
call fcn.00401af0
push eax
push str.FATAL____s_
jmp 0x40941c
call fcn.00401af0
push eax
push str.ERROR____s_
jmp 0x40941c
call fcn.00401af0
push eax
push str.WARN_____s_
jmp 0x40941c
call fcn.00401af0
push eax
push str.INFO_____s_
jmp 0x40941c
call fcn.00401af0
push eax
push str.DEBUG____s_
jmp 0x40941c
call fcn.00401af0
push eax
push str.TRACE____s_
push ebx
push edi
call esi
add esp, 0x10
lea edi, [edi + eax*2]
mov dword [ebp - 0x2020], edi
xor eax, eax
mov dword [ebp - 0x2024], eax
mov word [edi], 0x5b
mov dword [ebp - 4], eax
cmp dword [ebp + 0x18], eax
je 0x40944d
push dword [0x42404c]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x2034], eax
xor eax, eax
cmp dword [ebp + 0x18], eax
je 0x409466
push dword [0x424048]
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x2024], eax
xor edi, edi
cmp dword [ebp - 0x2034], edi
jne 0x40947e
mov dword [ebp - 0x2054], edi
jmp 0x4094ae
push dword [ebp - 0x2034]
call dword [sym.imp.MSVCR71.dll_wcslen]
mov edi, eax
mov dword [ebp - 0x2054], edi
lea eax, [edi + edi]
push eax
push dword [ebp - 0x2034]
mov eax, dword [ebp - 0x2020]
add eax, 2
push eax
call sub.MSVCR71.dll_memcpy
add esp, 0x10
or dword [ebp - 4], 0xffffffff
jmp 0x4094ef
mov eax, dword [ebp - 0x2020]
mov word [eax + edi*2 + 2], 0x5d
mov word [eax + edi*2 + 4], 0x20
lea edi, [eax + edi*2 + 6]
mov dword [ebp - 0x2020], edi
cmp dword [ebp - 0x2024], 0
je 0x4095a1
and dword [ebp - 0x2028], 0
mov dword [ebp - 4], 1
push 4
lea eax, [ebp - 0x2024]
push eax
lea eax, [ebp - 0x2028]
push eax
call sub.MSVCR71.dll_memcpy
add esp, 0xc
or dword [ebp - 4], 0xffffffff
jmp 0x409569
mov word [edi], 0x5b
push dword [ebp - 0x2028]
push str.0x_08x
push ebx
lea eax, [edi + 2]
push eax
call esi
push edi
call dword [sym.imp.MSVCR71.dll_wcslen]
add esp, 0x14
mov word [edi + eax*2], 0x5d
mov word [edi + eax*2 + 2], 0x20
lea edi, [edi + eax*2 + 4]
mov dword [ebp - 0x2020], edi
mov dword [ebp - 4], 2
lea ecx, [ebp - 0x201c]
mov eax, edi
sub eax, ecx
mov ecx, 0xfbf
sar eax, 1
sub ecx, eax
cmp dword [ebp - 0x203c], 0
jne 0x4095d5
push dword [ebp - 0x2030]
push 0x4187fc
push ecx
push edi
call esi
jmp 0x4095e9
push dword [ebp - 0x203c]
push dword [ebp - 0x2030]
push ecx
push edi
call dword [sym.imp.MSVCR71.dll__vsnwprintf]
add esp, 0x10
mov dword [ebp - 0x205c], eax
jmp 0x40963f
or dword [ebp - 4], 0xffffffff
cmp eax, 0xffffffff
jne 0x409650
push edi
call dword [sym.imp.MSVCR71.dll_wcslen]
pop ecx
lea edi, [edi + eax*2 - 2]
mov ax, word [edi]
cmp ax, 9
je 0x409669
cmp ax, 0xd
je 0x409669
cmp ax, 0xa
jne 0x409671
and word [edi], 0
dec edi
dec edi
jmp 0x409654
rdtsc
mov dword [ebp - 0x2060], edx
inc edi
inc edi
push 0x41875c
movzx ecx, ax
push ecx
shr eax, 0x10
push eax
push str._t_hu__hu_s
push 0x20
push edi
call esi
add esp, 0x18
lea esi, [edi + eax*2]
mov edi, dword [ebp - 0x2038]
cmp dword [ebp + 8], 6
je 0x4096ed
lea ecx, [edi + 0x34]
mov ebx, 0x416e08
push ebx
call fcn.00403d5e
test eax, eax
jne 0x4096c8
push dword [ebp - 0x202c]
lea ecx, [edi + 0x34]
call fcn.00403e10
test eax, eax
je 0x409721
lea ecx, [edi + 0x88]
push ebx
call fcn.00403d5e
test eax, eax
jne 0x409721
push dword [ebp - 0x202c]
lea ecx, [edi + 0x88]
call fcn.00403e10
test eax, eax
jne 0x409721
cmp dword [edi + 0x28], 0
je 0x4096ff
push dword [ebp - 0x202c]
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
cmp dword [edi + 0x2c], 0
je 0x409721
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.00406406
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.00413159
leave
ret 0x14