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

Disassembly:
push ebp
mov ebp, esp
push 0xfffffffffffffffe
push 0x4af060
push 0x429110
mov eax, dword fs:[0]
push eax
sub esp, 8
mov eax, 0x2078
call fcn.00426590
mov eax, dword [0x4b249c]
xor dword [ebp - 8], eax
xor eax, ebp
mov dword [ebp - 0x3c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0x10]
mov dword fs:[0], eax
mov dword [ebp - 0x18], esp
mov dword [ebp - 0x2080], ecx
mov dword [ebp - 0x204c], 0
mov dword [ebp - 0x1c], 0
cmp dword [ebp + 0x18], 0
je 0x4107ae
mov eax, dword [0x4b209c]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x204c], eax
mov ecx, dword [0x4b20a0]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x1c], eax
mov ecx, dword [ebp - 0x2080]
call fcn.00411190
mov edx, dword [ebp - 0x1c]
push edx
mov eax, dword [0x4b20a0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov ecx, dword [ebp - 0x204c]
push ecx
mov edx, dword [0x4b209c]
push edx
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
mov eax, dword [ebp - 0x2080]
cmp dword [eax + 0x28], 0
jne 0x4107cb
mov ecx, dword [ebp - 0x2080]
cmp dword [ecx + 0x2c], 0
jne 0x4107cb
jmp 0x410f3f
mov edx, dword [ebp - 0x2080]
mov eax, dword [ebp + 8]
cmp eax, dword [edx + 0x30]
jge 0x4107de
jmp 0x410f3f
xor ecx, ecx
mov word [ebp - 0x2040], cx
push 0x1ffe
push 0
lea edx, [ebp - 0x203e]
push edx
call fcn.00426300
add esp, 0xc
lea eax, [ebp - 0x2040]
mov dword [ebp - 0x205c], eax
mov dword [ebp - 0x34], 0
mov dword [ebp - 0x2060], 0
mov dword [ebp - 0x2070], 0
mov dword [ebp - 0x206c], 0
mov dword [ebp - 0x2068], 0
mov dword [ebp - 0x2064], 0
xor ecx, ecx
mov word [ebp - 0x30], cx
xor edx, edx
mov dword [ebp - 0x2e], edx
mov dword [ebp - 0x2a], edx
mov dword [ebp - 0x26], edx
mov word [ebp - 0x22], dx
cmp dword [0x4b43c4], 0
jne 0x41086b
call dword [sym.imp.KERNEL32.dll_GetCurrentProcessId]
mov dword [0x4b43c4], eax
lea eax, [ebp - 0x30]
push eax
call dword [sym.imp.KERNEL32.dll_GetLocalTime]
mov ecx, dword [ebp - 0x2080]
mov edx, dword [ecx + 0xf0]
mov dword [ebp - 0x2084], edx
mov eax, dword [ebp - 0x2080]
mov ecx, dword [eax + 0xf0]
add ecx, 1
mov edx, dword [ebp - 0x2080]
mov dword [edx + 0xf0], ecx
mov eax, dword [0x4b43c4]
push eax
movzx ecx, word [ebp - 0x22]
push ecx
movzx edx, word [ebp - 0x24]
push edx
movzx eax, word [ebp - 0x26]
push eax
movzx ecx, word [ebp - 0x28]
push ecx
mov edx, dword [ebp - 0x2084]
push edx
push str._08d_t_02d:_02d:_02d._03d_t__d_
push 0x100
mov eax, dword [ebp - 0x205c]
push eax
call fcn.0042934a
add esp, 0x24
mov dword [ebp - 0x206c], eax
mov ecx, dword [ebp - 0x206c]
mov edx, dword [ebp - 0x205c]
lea eax, [edx + ecx*2]
mov dword [ebp - 0x34], eax
call dword [sym.imp.KERNEL32.dll_GetCurrentThreadId]
push eax
push 0x43f6f0
push 0x100
mov ecx, dword [ebp - 0x34]
push ecx
call fcn.0042934a
add esp, 0x10
mov dword [ebp - 0x2068], eax
mov edx, dword [ebp - 0x2068]
mov eax, dword [ebp - 0x34]
lea ecx, [eax + edx*2]
mov dword [ebp - 0x2060], ecx
mov edx, dword [ebp + 8]
mov dword [ebp - 0x2088], edx
cmp dword [ebp - 0x2088], 6
ja case.default.0x410945
mov eax, dword [ebp - 0x2088]
jmp dword [eax*4 + 0x410f60]
call fcn.0040f3d0
push eax
push str.TRACE____s_
push 0x100
mov ecx, dword [ebp - 0x2060]
push ecx
call fcn.0042934a
add esp, 0x10
mov dword [ebp - 0x2064], eax
jmp 0x410a6b
call fcn.0040f3d0
push eax
push str.DEBUG____s_
push 0x100
mov edx, dword [ebp - 0x2060]
push edx
call fcn.0042934a
add esp, 0x10
mov dword [ebp - 0x2064], eax
jmp 0x410a6b
call fcn.0040f3d0
push eax
push str.INFO_____s_
push 0x100
mov eax, dword [ebp - 0x2060]
push eax
call fcn.0042934a
add esp, 0x10
mov dword [ebp - 0x2064], eax
jmp 0x410a6b
call fcn.0040f3d0
push eax
push str.WARN_____s_
push 0x100
mov ecx, dword [ebp - 0x2060]
push ecx
call fcn.0042934a
add esp, 0x10
mov dword [ebp - 0x2064], eax
jmp 0x410a6b
call fcn.0040f3d0
push eax
push str.ERROR____s_
push 0x100
mov edx, dword [ebp - 0x2060]
push edx
call fcn.0042934a
add esp, 0x10
mov dword [ebp - 0x2064], eax
jmp 0x410a6b
call fcn.0040f3d0
push eax
push str.FATAL____s_
push 0x100
mov eax, dword [ebp - 0x2060]
push eax
call fcn.0042934a
add esp, 0x10
mov dword [ebp - 0x2064], eax
jmp 0x410a6b
call fcn.0040f3d0
push eax
push str.PROMPT___s_
push 0x100
mov ecx, dword [ebp - 0x2060]
push ecx
call fcn.0042934a
add esp, 0x10
mov dword [ebp - 0x2064], eax
jmp 0x410a6b
jmp 0x410f3f
mov edx, dword [ebp - 0x2064]
mov eax, dword [ebp - 0x2060]
lea ecx, [eax + edx*2]
mov dword [ebp - 0x2070], ecx
mov dword [ebp - 0x2044], 0
mov dword [ebp - 0x2048], 0
mov dword [ebp - 0x38], 0
mov edx, 0x5b
mov eax, dword [ebp - 0x2070]
mov word [eax], dx
mov dword [ebp - 4], 0
cmp dword [ebp + 0x18], 0
je 0x410acb
mov ecx, dword [0x4b209c]
push ecx
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x208c], eax
jmp 0x410ad5
mov dword [ebp - 0x208c], 0
mov edx, dword [ebp - 0x208c]
mov dword [ebp - 0x2048], edx
cmp dword [ebp + 0x18], 0
je 0x410afb
mov eax, dword [0x4b20a0]
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov dword [ebp - 0x2090], eax
jmp 0x410b05
mov dword [ebp - 0x2090], 0
mov ecx, dword [ebp - 0x2090]
mov dword [ebp - 0x38], ecx
cmp dword [ebp - 0x2048], 0
jne 0x410b23
mov dword [ebp - 0x2044], 0
jmp 0x410b5a
mov edx, dword [ebp - 0x2048]
push edx
call fcn.00426a1b
add esp, 4
mov dword [ebp - 0x2044], eax
mov eax, dword [ebp - 0x2044]
shl eax, 1
push eax
mov ecx, dword [ebp - 0x2048]
push ecx
mov edx, dword [ebp - 0x2070]
add edx, 2
push edx
call fcn.00429420
add esp, 0xc
mov dword [ebp - 4], 0xfffffffe
jmp 0x410ba6
mov edx, 0x5d
mov eax, dword [ebp - 0x2044]
mov ecx, dword [ebp - 0x2070]
mov word [ecx + eax*2 + 2], dx
mov edx, 0x20
mov eax, dword [ebp - 0x2044]
mov ecx, dword [ebp - 0x2070]
mov word [ecx + eax*2 + 4], dx
mov edx, dword [ebp - 0x2044]
mov eax, dword [ebp - 0x2070]
lea ecx, [eax + edx*2 + 6]
mov dword [ebp - 0x2070], ecx
cmp dword [ebp - 0x38], 0
je 0x410ccc
mov dword [ebp - 0x2074], 0
mov dword [ebp - 0x2078], 0
mov dword [ebp - 4], 1
push 4
lea edx, [ebp - 0x38]
push edx
lea eax, [ebp - 0x2078]
push eax
call fcn.00429420
add esp, 0xc
mov dword [ebp - 4], 0xfffffffe
jmp 0x410c45
mov ecx, 0x5b
mov edx, dword [ebp - 0x2070]
mov word [edx], cx
mov eax, dword [ebp - 0x2078]
push eax
push str.0x_08x
push 0x100
mov ecx, dword [ebp - 0x2070]
add ecx, 2
push ecx
call fcn.0042934a
add esp, 0x10
mov edx, dword [ebp - 0x2070]
push edx
call fcn.00426a1b
add esp, 4
mov dword [ebp - 0x2074], eax
mov eax, 0x5d
mov ecx, dword [ebp - 0x2074]
mov edx, dword [ebp - 0x2070]
mov word [edx + ecx*2], ax
mov eax, 0x20
mov ecx, dword [ebp - 0x2074]
mov edx, dword [ebp - 0x2070]
mov word [edx + ecx*2 + 2], ax
mov eax, dword [ebp - 0x2074]
mov ecx, dword [ebp - 0x2070]
lea edx, [ecx + eax*2 + 4]
mov dword [ebp - 0x2070], edx
mov dword [ebp - 4], 2
cmp dword [ebp + 0x10], 0
jne 0x410d12
mov eax, dword [ebp + 0xc]
push eax
push 0x43e1f0
mov ecx, dword [ebp - 0x2070]
sub ecx, dword [ebp - 0x205c]
sar ecx, 1
mov edx, 0xfff
sub edx, ecx
sub edx, 0x40
push edx
mov eax, dword [ebp - 0x2070]
push eax
call fcn.0042934a
add esp, 0x10
mov dword [ebp - 0x2064], eax
jmp 0x410d48
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp - 0x2070]
sub eax, dword [ebp - 0x205c]
sar eax, 1
mov ecx, 0xfff
sub ecx, eax
sub ecx, 0x40
push ecx
mov edx, dword [ebp - 0x2070]
push edx
call fcn.0042a120
add esp, 0x10
mov dword [ebp - 0x2064], eax
mov dword [ebp - 4], 0xfffffffe
jmp 0x410dac
cmp dword [ebp - 0x2064], 0xffffffff
jne 0x410dca
mov edx, dword [ebp - 0x2070]
push edx
call fcn.00426a1b
add esp, 4
mov dword [ebp - 0x2064], eax
mov eax, dword [ebp - 0x2064]
mov ecx, dword [ebp - 0x2070]
lea edx, [ecx + eax*2 - 2]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x20]
movzx ecx, word [eax]
cmp ecx, 9
je 0x410dfe
mov edx, dword [ebp - 0x20]
movzx eax, word [edx]
cmp eax, 0xd
je 0x410dfe
mov ecx, dword [ebp - 0x20]
movzx edx, word [ecx]
cmp edx, 0xa
jne 0x410e11
xor eax, eax
mov ecx, dword [ebp - 0x20]
mov word [ecx], ax
mov edx, dword [ebp - 0x20]
sub edx, 2
mov dword [ebp - 0x20], edx
jmp 0x410ddd
mov dword [ebp - 0x2058], 0
xor eax, eax
mov dword [ebp - 0x2054], eax
call fcn.00410f80
mov dword [ebp - 0x2058], eax
mov dword [ebp - 0x2054], edx
mov ecx, dword [ebp - 0x20]
add ecx, 2
mov dword [ebp - 0x20], ecx
push 0x43f574
mov edx, dword [ebp - 0x2058]
and edx, 0xffff
movzx eax, dx
push eax
mov ecx, dword [ebp - 0x2058]
shr ecx, 0x10
and ecx, 0xffff
movzx edx, cx
push edx
push str._t_hu__hu_s
push 0x20
mov eax, dword [ebp - 0x20]
push eax
call fcn.0042934a
add esp, 0x18
mov dword [ebp - 0x2064], eax
mov ecx, dword [ebp - 0x2064]
mov edx, dword [ebp - 0x20]
lea eax, [edx + ecx*2]
mov dword [ebp - 0x20], eax
cmp dword [ebp + 8], 6
je 0x410ef7
push 0x43ea20
mov ecx, dword [ebp - 0x2080]
add ecx, 0x34
call fcn.00410f90
test eax, eax
jne 0x410ec2
mov ecx, dword [ebp - 0x34]
push ecx
mov ecx, dword [ebp - 0x2080]
add ecx, 0x34
call fcn.00411090
test eax, eax
jne 0x410ec2
jmp 0x410f3f
push 0x43ea20
mov ecx, dword [ebp - 0x2080]
add ecx, 0x88
call fcn.00410f90
test eax, eax
jne 0x410ef5
mov edx, dword [ebp - 0x34]
push edx
mov ecx, dword [ebp - 0x2080]
add ecx, 0x88
call fcn.00411090
test eax, eax
je 0x410ef7
jmp 0x410f3f
mov eax, dword [ebp - 0x2080]
cmp dword [eax + 0x28], 0
je 0x410f0d
mov ecx, dword [ebp - 0x34]
push ecx
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov edx, dword [ebp - 0x2080]
cmp dword [edx + 0x2c], 0
je 0x410f3f
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp - 0x20]
sub ecx, dword [ebp - 0x205c]
sar ecx, 1
push ecx
mov edx, dword [ebp - 0x205c]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x2080]
call fcn.00411540
mov ecx, dword [ebp - 0x10]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x3c]
xor ecx, ebp
call fcn.0042624f
mov esp, ebp
pop ebp
ret 0x14