Function at 0x41d330
Capabilities:
Get common file path
Get thread local storage value
Set current directory
Set uefi variable

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x2ad0
call fcn.004110a0
mov dword [ebp - 4], 0
jmp 0x41d34f
mov eax, dword [ebp - 4]
add eax, 1
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0x32d05d76
jge 0x41d42e
cmp dword [0x43b74c], 0xfc
jne 0x41d3b3
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_FreeUserPhysicalPages]
xor ecx, ecx
mov word [ebp - reloc.kernel32.dll_GetVersionExW], cx
xor edx, edx
mov dword [ebp - 0x866], edx
mov dword [ebp - 0x862], edx
mov dword [ebp - 0x85e], edx
mov word [ebp - reloc.kernel32.dll_GetVersionExW], dx
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetTapeParameters]
push 0
lea eax, [ebp - 0x858]
push eax
call dword [sym.imp.KERNEL32.dll_GetConsoleAliasExesW]
cmp dword [0x43b74c], 0x5e4
jne 0x41d41e
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleWindowInfo]
push 0
lea ecx, [ebp - 0x1288]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemWow64DirectoryW]
lea edx, [ebp - 0xa88]
push edx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCPInfoExW]
push 0
call dword [sym.imp.KERNEL32.dll_GetStartupInfoA]
lea eax, [ebp - 0x128c]
push eax
push 0
call dword [sym.imp.KERNEL32.dll_QueryMemoryResourceNotification]
xor ecx, ecx
mov word [ebp - reloc.kernel32.dll_GetVersionExW], cx
xor edx, edx
mov word [ebp - reloc.kernel32.dll_GetVersionExW], dx
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetConsoleCtrlHandler]
cmp dword [ebp - 4], 0x9be51dc
jle 0x41d429
jmp 0x41d42e
jmp 0x41d346
push 0x427fc0
mov eax, dword [0x43b74c]
push eax
mov ecx, dword [0x4397bc]
push ecx
call fcn.0041d1c0
mov dword [ebp - 0x12a8], 0
jmp 0x41d460
mov edx, dword [ebp - 0x12a8]
add edx, 1
mov dword [ebp - 0x12a8], edx
cmp dword [ebp - 0x12a8], 0x3e7a3
jge 0x41d4a5
cmp dword [0x43b74c], 0x10
jne 0x41d48a
lea eax, [ebp - 0x12ac]
push eax
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push 0
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryW]
push 0
call dword [sym.imp.KERNEL32.dll_GlobalFlags]
cmp dword [ebp - 0x12a8], 0x1e673
jne 0x41d4a3
call fcn.0041cae0
jmp 0x41d451
mov dword [ebp - 0x12b0], 0
jmp 0x41d4c0
mov ecx, dword [ebp - 0x12b0]
add ecx, 1
mov dword [ebp - 0x12b0], ecx
cmp dword [ebp - 0x12b0], 0xdd9a7
jge 0x41d4ec
cmp dword [0x43b74c], 0xc01
jne 0x41d4ea
lea edx, [ebp - 0x12b4]
push edx
push 0x424fb0
call dword [sym.imp.KERNEL32.dll_GetBinaryTypeW]
jmp 0x41d4b1
call dword [0x4397bc]
cmp dword [0x43b74c], 0x1144
jne 0x41d5c2
push 0
push 0
push 0x425028
push 0x42503c
call dword [sym.imp.KERNEL32.dll_SetFirmwareEnvironmentVariableA]
mov dword [ebp - 0x22cc], 0
push 0
mov eax, dword [ebp - 0x22cc]
push eax
call dword [sym.imp.KERNEL32.dll_ActivateActCtx]
lea ecx, [ebp - 0x22c4]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_GetConsoleMode]
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetCommConfig]
push 0
push 0
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x425048
push 0
push 0
push 0
call dword [sym.imp.KERNEL32.dll_SetCalendarInfoW]
lea edx, [ebp - 0x22c0]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryW]
push 0x4250a0
call dword [sym.imp.KERNEL32.dll_SetComputerNameA]
push 0
lea eax, [ebp - 0x1ab8]
push eax
push 0
push 0x4250b8
push 0
push 0
call dword [sym.imp.KERNEL32.dll_LCMapStringW]
lea ecx, [ebp - 0x1abc]
push ecx
call dword [sym.imp.KERNEL32.dll_InterlockedDecrement]
push 0
lea edx, [ebp - 0x2ad0]
push edx
push 0x425158
call dword [sym.imp.KERNEL32.dll_GetProfileSectionW]
push 0
call dword [sym.imp.KERNEL32.dll_TlsGetValue]
xor eax, eax
mov esp, ebp
pop ebp
ret