Function at 0x4362a0
Capabilities:
Allocate thread local storage
Get thread local storage value
Set thread local storage value
Write file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x87c
mov eax, dword [0x4ff004]
xor eax, esp
mov dword [esp + 0x878], eax
push ebx
push esi
lea eax, [esp + 0xc]
push edi
push eax
lea ebx, [esp + 0x45]
call fcn.0044609b
mov eax, dword [0x4ffde8]
add esp, 4
cmp eax, 0xffffffff
jne 0x4362e3
call dword [sym.imp.KERNEL32.dll_TlsAlloc]
mov dword [0x4ffde8], eax
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
mov edi, eax
test edi, edi
jne 0x43630b
mov edi, dword [0x4ffde4]
push edi
push dword [0x4ffde8]
lea eax, [edi + 1]
mov dword [0x4ffde4], eax
call dword [sym.imp.KERNEL32.dll_TlsSetValue]
lea eax, [esp + 0x10]
push eax
lea eax, [esp + 0x20]
push eax
call fcn.0044ca53
lea eax, [esp + 0x24]
push eax
push str.__Y__m__d__H:_M:_S_
lea eax, [esp + 0x51]
push 0x40
push eax
call fcn.0044cdc1
lea ecx, [esp + 0x59]
add esp, 0x18
lea edx, [ecx + 1]
nop word [eax + eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x436340
sub ecx, edx
lea eax, [esp + 0x41]
add ecx, eax
lea eax, [esp + 0x80]
push edi
push str.__02x_
sub eax, ecx
push eax
push ecx
call fcn.00436260
add esp, 0x10
lea eax, [ebp + 0xc]
push eax
push 0
push dword [ebp + 8]
lea eax, [esp + 0x8c]
push 0x800
push eax
call fcn.00409500
push dword [eax + 4]
push dword [eax]
call fcn.0044bc1b
lea esi, [esp + 0x9c]
add esp, 0x1c
lea ecx, [esi + 1]
nop word [eax + eax]
mov al, byte [esi]
inc esi
test al, al
jne 0x4363a0
sub esi, ecx
je 0x436527
push dword [0xd4c6ac]
call dword [sym.imp.KERNEL32.dll_EnterCriticalSection]
mov eax, dword [0x500b9c]
cmp eax, edi
jne 0x4363cb
mov byte [esp + 0x41], 0
jmp 0x43643c
test eax, eax
je 0x43643c
lea ebx, [esp + 0x40]
mov byte [esp + 0x40], 0xa
xor ecx, ecx
nop word [eax + eax]
cmp ecx, 0x800
jae 0x4363f0
inc ecx
cmp byte [esp + ecx + 0x40], 0
jne 0x4363e0
lea eax, [ecx + 1]
cmp eax, 0x800
jbe 0x43641d
push 0x162
push str.ymemory
push str.YPANIC:_s:_d_n
push 0x162
push str.ymemory
call fcn.00409950
add esp, 0x14
jmp 0x43643c
mov edx, 0x800
lea eax, [esp + 0x40]
push 0x800
sub edx, ecx
add ecx, eax
push str._..._
call fcn.0041c8a0
add esp, 8
mov eax, dword [0x500ba0]
test eax, eax
je 0x4364bd
push 0x4fa014
push eax
lea eax, [esp + 0x14]
push eax
call fcn.0044bf78
add esp, 0xc
test eax, eax
jne 0x436499
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x436461
push dword [esp + 0xc]
sub ecx, edx
push ecx
push 1
push ebx
call fcn.0044be5e
push dword [esp + 0x1c]
lea eax, [esp + 0x94]
push esi
push 1
push eax
call fcn.0044be5e
push dword [esp + 0x2c]
call fcn.00449c65
add esp, 0x24
jmp 0x4364bd
call fcn.0044c515
push dword [eax]
call fcn.0044cea1
add esp, 4
push eax
push dword [0x500ba0]
push ebx
push str._sUnable_to_save_log_to_file__s___s__n
call fcn.0041cc00
add esp, 0x10
lea ecx, [esp + 0x80]
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4364c7
sub ecx, edx
lea edx, [esp + 0x80]
push 0xd4c6b0
push ecx
mov ecx, 0xd4c6c0
call fcn.004115f0
lea eax, [esp + 0x88]
push eax
push ebx
push str._s_s
call fcn.0041cc00
mov al, byte [esp + esi + 0x93]
add esp, 0x14
cmp al, 0xd
je 0x43650c
cmp al, 0xa
jne 0x436515
or byte [0xd46f1f], 0x10
xor edi, edi
push dword [0xd4c6ac]
mov dword [0x500b9c], edi
call dword [sym.imp.KERNEL32.dll_LeaveCriticalSection]
mov ecx, dword [esp + 0x884]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.004423fe
mov esp, ebp
pop ebp
ret