Function at 0x40e290
Capabilities:
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1c40
call fcn.00439bd0
mov eax, dword [0x466eb0]
xor eax, ebp
mov dword [ebp - 4], eax
mov edx, dword [ebp + 0x14]
mov eax, dword [ebp + 0x10]
push ebx
push esi
push edi
lea ecx, [ebp + 0x18]
push ecx
push edx
mov dword [ebp - 0x1c38], eax
mov dword [ebp - 0x1c34], 0
call fcn.00438ff5
mov esi, eax
lea eax, [esi + esi + 2]
push eax
call fcn.00437584
mov edx, dword [ebp + 0x14]
lea ecx, [ebp + 0x18]
push ecx
push edx
inc esi
mov ebx, eax
push esi
push ebx
call fcn.00439180
mov edi, dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
add esp, 0x1c
push 0
push 0
push 0
push 0
push 0xffffffffffffffff
push ebx
push 0
push 0
call edi
mov esi, eax
lea eax, [esi + 1]
push eax
call fcn.00437584
add esp, 4
push 0
push 0
push esi
push eax
push 0xffffffffffffffff
push ebx
push 0
push 0
mov dword [ebp - 0x1c30], eax
call edi
lea ecx, [ebp - 0x1c40]
push ecx
call fcn.0043afd7
lea edx, [ebp - 0x1c40]
push edx
lea eax, [ebp - 0x1c28]
push eax
call fcn.0043b818
add esp, 0xc
test eax, eax
jne 0x40e5bb
push 0x200
lea ecx, [ebp - 0x1804]
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
mov eax, dword [ebp + 8]
cmp eax, 1
jne 0x40e38d
lea edx, [ebp - 0x1804]
push edx
lea eax, [ebp - 0x404]
push 0x200
push eax
call fcn.004395f9
push 0x5c
lea ecx, [ebp - 0x404]
push ecx
jmp 0x40e3d0
cmp eax, 2
jne 0x40e5bb
lea edx, [ebp - 0x404]
push edx
push 0x200
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x1804]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
push eax
lea ecx, [ebp - 0x404]
push 0x200
push ecx
call fcn.0043b028
push 0x2e
lea edx, [ebp - 0x404]
push edx
call fcn.0043ae50
add esp, 0x14
push str.log
mov byte [eax], 0
lea eax, [ebp - 0x404]
push 0x200
push eax
call fcn.0043b028
lea ecx, [ebp - 0x404]
push ecx
call fcn.0040e6b0
mov edx, dword [ebp - 0x1c1c]
mov eax, dword [ebp - 0x1c18]
mov ecx, dword [ebp - 0x1c14]
push edx
mov edx, dword [ebp - 0x1c38]
inc eax
push eax
add ecx, 0x76c
push ecx
push edx
lea eax, [ebp - 0x404]
push eax
push str._s_s_04d_02d_02d.txt
lea edx, [ebp - 0x1c04]
call fcn.0040e9a0
push 0x45f258
lea ecx, [ebp - 0x1c04]
push ecx
lea edx, [ebp - 0x1c2c]
push edx
call fcn.0043cc91
add esp, 0x34
test eax, eax
jne 0x40e5bb
cmp dword [ebp + 0xc], eax
je 0x40e512
mov eax, dword [ebp - 0x1c1c]
mov ecx, dword [ebp - 0x1c18]
mov edx, dword [ebp - 0x1c14]
push eax
inc ecx
push ecx
add edx, 0x76c
push edx
push str._04d
lea edx, [ebp - 0x1404]
call fcn.0040e9c0
lea eax, [ebp - 0x1404]
add esp, 0x10
lea edx, [eax + 1]
jmp 0x40e4a0
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40e4a0
mov ecx, dword [ebp - 0x1c2c]
push ecx
sub eax, edx
push eax
lea edx, [ebp - 0x1404]
push 1
push edx
call fcn.0043d36b
mov eax, dword [ebp - 0x1c28]
mov ecx, dword [ebp - 0x1c24]
mov edx, dword [ebp - 0x1c20]
push eax
push ecx
push edx
push str._02d:_02d:_02d
lea edx, [ebp - 0x1404]
call fcn.0040e9c0
lea eax, [ebp - 0x1404]
add esp, 0x20
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40e4f0
mov ecx, dword [ebp - 0x1c2c]
push ecx
sub eax, edx
push eax
lea edx, [ebp - 0x1404]
push 1
push edx
call fcn.0043d36b
add esp, 0x10
mov edi, dword [ebp - 0x1c30]
mov eax, edi
lea edx, [eax + 1]
lea ecx, [ecx]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40e520
sub eax, edx
cmp eax, 0xfff
jae 0x40e542
mov eax, edi
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40e535
sub eax, edx
mov esi, eax
jmp 0x40e547
mov esi, 0xfff
push 0x1000
lea eax, [ebp - 0x1404]
push 0
push eax
call fcn.004391a0
push esi
lea ecx, [ebp - 0x1404]
push edi
push ecx
call fcn.00439c00
mov edx, dword [ebp - 0x1c2c]
push edx
push esi
lea eax, [ebp - 0x1404]
push 1
push eax
call fcn.0043d36b
push 0x45f288
lea edx, [ebp - 0x1404]
call fcn.0040e9c0
mov ecx, dword [ebp - 0x1c2c]
push ecx
push 2
lea edx, [ebp - 0x1404]
push 1
push edx
call fcn.0043d36b
mov eax, dword [ebp - 0x1c2c]
push eax
call fcn.0043c35b
add esp, 0x40
mov esi, 1
jmp 0x40e5c7
mov esi, dword [ebp - 0x1c34]
mov edi, dword [ebp - 0x1c30]
test ebx, ebx
je 0x40e5d4
push ebx
call fcn.0043921a
add esp, 4
test edi, edi
je 0x40e5e1
push edi
call fcn.0043921a
add esp, 4
mov ecx, dword [ebp - 4]
pop edi
mov eax, esi
pop esi
xor ecx, ebp
pop ebx
call fcn.00438fc8
mov esp, ebp
pop ebp
ret