Function at 0x402090
Capabilities:
Get common file path
Print debug messages

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x210
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x20c], eax
push esi
push edi
lea eax, [esp + 8]
push eax
push 0
push 0
push 0x23
push 0
call dword [sym.imp.SHELL32.dll_SHGetFolderPathW]
test eax, eax
je 0x4020e0
call dword [sym.imp.KERNEL32.dll_GetLastError]
add eax, 0x1e
pop edi
pop esi
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.0041297c
mov esp, ebp
pop ebp
ret
push 0x428404
lea eax, [esp + 0xc]
push eax
push str._s_s_
push 0x104
push 0x42ef70
call fcn.00412a58
add esp, 0x14
call fcn.00401bd0
mov edi, eax
test edi, edi
je 0x4021e0
push 0x1000a
call fcn.00412ac8
mov esi, eax
add esp, 4
test esi, esi
jne 0x402151
push str.Memory_allocation_error_in_log_file_n
call fcn.00412f3c
add esp, 4
push str.Memory_allocation_error_in_log_file_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.0041297c
mov esp, ebp
pop ebp
ret
push 0x4283c8
push 0xffff
push esi
call fcn.00412a74
add esp, 0xc
push edi
test eax, eax
jle 0x4021a9
push esi
push str.MbaeSetDataPath
push 1
mov edx, 0x422
mov byte [esi + 0xffff], 0
mov ecx, str.....mbae_commonMbaeLog.cpp
call fcn.00401280
add esp, 0x10
push esi
call fcn.00412a90
add esp, 4
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.0041297c
mov esp, ebp
pop ebp
ret
push str.Error__d_in_swprintf_s_n
call fcn.00412f3c
add esp, 8
push str.Error_in_swprintf_s_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push esi
call fcn.00412a90
add esp, 4
mov eax, edi
pop edi
pop esi
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.0041297c
mov esp, ebp
pop ebp
ret
push str.mbae_default.log
push 0x42ef70
lea eax, [esp + 0x10]
push 0x4281e8
push eax
call fcn.004029c0
add esp, 0x10
lea eax, [esp + 8]
push 0
push 0x80
push 4
push 0
push 1
push 4
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x402306
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 5
jne 0x40230d
push 0x1000a
call fcn.00412ac8
mov esi, eax
add esp, 4
test esi, esi
jne 0x402270
push str.Memory_allocation_error_in_log_file_n
call fcn.00412f3c
add esp, 4
push str.Memory_allocation_error_in_log_file_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
lea eax, [esi + 0x11]
pop edi
pop esi
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.0041297c
mov esp, ebp
pop ebp
ret
push 0x4283c8
push 0xffff
push esi
call fcn.00412a74
add esp, 0xc
push 0x11
test eax, eax
jle 0x4022cc
push esi
push str.MbaeSetDataPath
push 1
mov edx, 0x42b
mov byte [esi + 0xffff], 0
mov ecx, str.....mbae_commonMbaeLog.cpp
call fcn.00401280
add esp, 0x10
push esi
call fcn.00412a90
add esp, 4
mov eax, 0x11
pop edi
pop esi
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.0041297c
mov esp, ebp
pop ebp
ret
push str.Error__d_in_swprintf_s_n
call fcn.00412f3c
add esp, 8
push str.Error_in_swprintf_s_n
call dword [sym.imp.KERNEL32.dll_OutputDebugStringW]
push esi
call fcn.00412a90
add esp, 4
mov eax, 0x11
pop edi
pop esi
mov ecx, dword [esp + 0x20c]
xor ecx, esp
call fcn.0041297c
mov esp, ebp
pop ebp
ret
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [esp + 0x214]
xor eax, eax
pop edi
pop esi
xor ecx, esp
call fcn.0041297c
mov esp, ebp
pop ebp
ret