Function at 0x46a1d0
Capabilities:
Get common file path
Get thread local storage value
Write file on windows

Disassembly:
mov eax, 0x1804
call fcn.004ad6f0
mov eax, dword [0x5296dc]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
test eax, eax
je 0x46ac53
mov ecx, dword [eax + 0x4574]
test ecx, ecx
je 0x46ac53
push 0x800
push 0
push 0x65
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0xc]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
lea edx, [esp + 8]
push 0x3a
push edx
mov byte [esp + 0x80f], 0
call fcn.0046d140
lea ecx, [esp + 9]
cmp eax, ecx
je 0x46a28e
lea edx, [esp + 8]
push 0x51ce38
push edx
call fcn.0046d0f0
lea ecx, [esp + 8]
cmp eax, ecx
je 0x46a28e
lea edx, [esp + 0x808]
push 0x800
push edx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
mov al, byte [esp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp al, 0x5c
je 0x46a27d
lea eax, [esp + 0x808]
push 0x51cdf4
push eax
call esi
lea ecx, [esp + 8]
lea edx, [esp + 0x808]
push ecx
push edx
call esi
jmp 0x46a2a1
lea eax, [esp + 8]
lea ecx, [esp + 0x808]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 0
push 0x80
push 4
push 0
push 3
lea edx, [esp + 0x81c]
push 0xc0000000
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x46ac53
push ebx
push ebp
push edi
push 2
push 0
push 0
push esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea eax, [esp + 0x10]
push 0
push eax
push 2
push 0x51ce1c
push esi
call ebx
lea ecx, [esp + 0x1014]
push ecx
call fcn.00466c60
add esp, 4
lea edx, [esp + 0x1014]
push edx
push 0
push 0x4c
call fcn.0046cff0
mov ebp, dword [sym.imp.USER32.dll_wsprintfA]
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov edi, dword [esp + 0x1818]
mov ecx, dword [edi + 4]
push ecx
push 0
push 0x4d
call fcn.0046cff0
add esp, 8
lea edx, [esp + 0x18]
push eax
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
push eax
push edx
push esi
call ebx
mov eax, dword [edi + 8]
push eax
push 0
push 0x4e
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0x18]
push eax
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x1c]
push eax
push ecx
push esi
call ebx
mov edx, dword [edi + 8]
push 0x800
push edx
push esi
call fcn.00469df0
mov eax, dword [edi + 0xc]
add esp, 0xc
push eax
push 0
push 0x4f
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0x18]
push eax
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x1c]
push eax
push ecx
push esi
call ebx
mov edx, dword [edi + 0x10]
push edx
push 0
push 0x50
call fcn.0046cff0
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov ecx, dword [edi + 0x10]
push 0x4e20
push ecx
push esi
call fcn.00469df0
mov edx, dword [edi + 0x14]
add esp, 0xc
push edx
push 0
push 0x51
call fcn.0046cff0
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov ecx, dword [edi + 0x18]
push ecx
push 0
push 0x52
call fcn.0046cff0
add esp, 8
lea edx, [esp + 0x18]
push eax
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
push eax
push edx
push esi
call ebx
mov eax, dword [edi + 0x18]
push 0x800
push eax
push esi
call fcn.00469df0
mov ecx, dword [edi + 0x1c]
add esp, 0xc
push ecx
push 0
push 0x53
call fcn.0046cff0
add esp, 8
lea edx, [esp + 0x18]
push eax
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
push eax
push edx
push esi
call ebx
mov eax, dword [edi + 0x20]
push eax
push 0
push 0x54
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0x18]
push eax
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x1c]
push eax
push ecx
push esi
call ebx
mov edx, dword [edi + 0x24]
push edx
push 0
push 0x55
call fcn.0046cff0
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov ecx, dword [edi + 0x28]
push ecx
push 0
push 0x56
call fcn.0046cff0
add esp, 8
lea edx, [esp + 0x18]
push eax
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
push eax
push edx
push esi
call ebx
mov eax, dword [edi + 0x2c]
push eax
push 0
push 0x57
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0x18]
push eax
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x1c]
push eax
push ecx
push esi
call ebx
mov edx, dword [edi + 0x30]
push edx
push 0
push 0x58
call fcn.0046cff0
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov ecx, dword [edi + 0x34]
push ecx
push 0
push 0x59
call fcn.0046cff0
add esp, 8
lea edx, [esp + 0x18]
push eax
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
push eax
push edx
push esi
call ebx
mov eax, dword [edi + 0x38]
push eax
push 0
push 0x5a
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0x18]
push eax
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x1c]
push eax
push ecx
push esi
call ebx
mov edx, dword [edi + 0x3c]
push edx
push 0
push 0x5b
call fcn.0046cff0
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov ecx, dword [edi + 0x40]
push ecx
push 0
push 0x5c
call fcn.0046cff0
add esp, 8
lea edx, [esp + 0x18]
push eax
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
push 0
lea ecx, [esp + 0x18]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
push eax
push edx
push esi
call ebx
mov eax, dword [edi + 0x44]
push eax
push 0
push 0x5d
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0x18]
push eax
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x1c]
push eax
push ecx
push esi
call ebx
mov edx, dword [edi + 0x48]
push edx
push 0
push 0x5e
call fcn.0046cff0
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov ecx, dword [edi + 0x4c]
push ecx
push 0
push 0x5f
call fcn.0046cff0
add esp, 8
lea edx, [esp + 0x18]
push eax
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
push eax
push edx
push esi
call ebx
mov eax, dword [edi + 0x50]
push eax
push 0
push 0x60
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0x18]
push eax
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x1c]
push eax
push ecx
push esi
call ebx
mov edx, dword [edi + 0x50]
push 0x1000
push edx
push esi
call fcn.00469df0
mov eax, dword [edi + 0x5c]
add esp, 0xc
push eax
push 0
push 0x61
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0x18]
push eax
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x1c]
push eax
push ecx
push esi
call ebx
mov edx, dword [edi + 0x60]
push edx
push 0
push 0x62
call fcn.0046cff0
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov ecx, dword [edi + 0x60]
push 0x41
push ecx
push esi
call fcn.00469df0
mov edx, dword [edi + 0x64]
add esp, 0xc
push edx
push 0
push 0x63
call fcn.0046cff0
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov ecx, dword [edi + 0x68]
push ecx
push 0
push 0x64
call fcn.0046cff0
add esp, 8
lea edx, [esp + 0x18]
push eax
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
push eax
push edx
push esi
call ebx
xor eax, eax
mov ax, word [edi + 0x6c]
push eax
push 0
push 0x7f
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0x18]
push eax
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x1c]
push eax
push ecx
push esi
call ebx
mov edx, dword [edi + 0x6e]
push edx
push 0
push 0x85
call fcn.0046cff0
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov ecx, dword [edi + 0x7e]
push ecx
push 0
push 0x87
call fcn.0046cff0
add esp, 8
lea edx, [esp + 0x18]
push eax
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
push eax
push edx
push esi
call ebx
mov eax, dword [edi + 0x7e]
push 0x400
push eax
push esi
call fcn.00469df0
mov ecx, dword [edi + 0x76]
add esp, 0xc
push ecx
push 0
push 0x88
call fcn.0046cff0
add esp, 8
lea edx, [esp + 0x18]
push eax
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
push eax
push edx
push esi
call ebx
mov eax, dword [edi + 0x7a]
push eax
push 0
push 0x89
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0x18]
push eax
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x1c]
push eax
push ecx
push esi
call ebx
mov edx, dword [edi + 0x82]
push edx
push 0
push 0x8a
call fcn.0046cff0
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov ecx, dword [edi + 0x86]
push ecx
push 0
push 0x8b
call fcn.0046cff0
add esp, 8
lea edx, [esp + 0x18]
push eax
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
push eax
push edx
push esi
call ebx
mov eax, dword [edi + 0x96]
push eax
push 0
push 0x97
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0x18]
push eax
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x1c]
push eax
push ecx
push esi
call ebx
mov edx, dword [edi + 0x8a]
push edx
push 0
push 0x8c
call fcn.0046cff0
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov ecx, dword [edi + 0x9a]
push ecx
push 0
push 0x98
call fcn.0046cff0
add esp, 8
lea edx, [esp + 0x18]
push eax
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea edx, [esp + 0x1c]
push eax
push edx
push esi
call ebx
mov eax, dword [edi + 0x8e]
push eax
push 0
push 0x86
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0x18]
push eax
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x1c]
push eax
push ecx
push esi
call ebx
mov edx, dword [edi + 0x92]
push edx
push 0
push 0x96
call fcn.0046cff0
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
mov ecx, dword [edi + 0x9e]
push ecx
push 0
push 0x99
call fcn.0046cff0
add esp, 8
lea edx, [esp + 0x18]
push eax
push edx
call ebp
add esp, 0xc
lea eax, [esp + 0x10]
lea ecx, [esp + 0x14]
push 0
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea edx, [esp + 0x20]
push edx
push esi
call ebx
mov eax, dword [edi + 0xa2]
push eax
push 0
push 0x9a
call fcn.0046cff0
add esp, 8
lea ecx, [esp + 0x18]
push eax
push ecx
call ebp
add esp, 0xc
lea edx, [esp + 0x10]
lea eax, [esp + 0x14]
push 0
push edx
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea ecx, [esp + 0x1c]
push eax
push ecx
push esi
call ebx
mov edx, dword [edi + 0xa6]
push edx
push 0
push 0x9b
call fcn.0046cff0
add esp, 8
push eax
lea eax, [esp + 0x1c]
push eax
call ebp
add esp, 0xc
lea ecx, [esp + 0x10]
lea edx, [esp + 0x14]
push 0
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
push eax
lea eax, [esp + 0x20]
push eax
push esi
call ebx
lea ecx, [esp + 0x10]
push 0
push ecx
push 2
push 0x51ce1c
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop ebp
pop ebx
pop esi
add esp, 0x1804
ret