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

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
mov eax, 0x154c
call fcn.00417020
mov eax, dword [section..data]
xor eax, esp
mov dword [esp + 0x1548], eax
push ebx
mov ebx, dword [ebp + 8]
mov dword [esp + 0xc], ebx
push esi
push edi
test ebx, ebx
je 0x40bc4d
push 0
call dword [sym.imp.ole32.dll_CoInitialize]
xor eax, eax
push 0x1fe
push eax
mov word [esp + 0x130], ax
lea eax, [esp + 0x132]
push eax
call fcn.004164f0
add esp, 0xc
lea eax, [esp + 0x1c]
push eax
push 0x10
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
test eax, eax
jne 0x40b927
lea eax, [esp + 0x128]
push eax
push dword [esp + 0x20]
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListW]
push 0x4344e8
lea eax, [esp + 0x12c]
push 0x100
push eax
call fcn.00414a37
add esp, 0xc
cmp word [esp + 0x128], 0
je 0x40bc46
cmp byte [ebx + 0x1444], 0x3a
lea esi, [ebx + 0x1444]
jne 0x40bc46
push 0x104
lea eax, [esp + 0x24]
push 0
push eax
call fcn.004164f0
add esp, 0xc
lea eax, [esp + 0x738]
push 0x104
push 0
push eax
call fcn.004164f0
add esp, 0xc
lea eax, [esp + 0x530]
push 0x104
push 0
push eax
call fcn.004164f0
add esp, 0xc
lea eax, [esp + 0x1150]
push 0x104
push eax
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
push esi
lea eax, [esp + 0x1155]
push 0x103
push eax
call fcn.00412f97
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [esp + 0x744]
add esp, 0xc
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x115c]
push eax
push 0
push 0x3a8
call edi
lea esi, [ebx + 0x1000]
test esi, esi
je 0x40bc62
cmp byte [esi], 0
je 0x40bc62
xor edi, edi
mov dword [esp + 0x10], edi
test edi, edi
je 0x40ba0c
push edi
call fcn.004130f3
add esp, 4
mov dword [esp + 0x10], 0
lea edx, [esp + 0x10]
mov ecx, esi
call fcn.00403dc0
mov edi, dword [esp + 0x10]
mov ebx, eax
test edi, edi
je 0x40ba25
test ebx, ebx
jne 0x40ba2f
push 0x64
call dword [sym.imp.KERNEL32.dll_Sleep]
jmp 0x40b9f7
call dword [sym.imp.USER32.dll_GetDesktopWindow]
push 0
mov esi, eax
lea eax, [esp + 0x24]
push 0x23
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderPathA]
push str._tempicon_
lea eax, [esp + 0x24]
push 0x104
push eax
call fcn.00413090
add esp, 0xc
xor eax, eax
mov word [esp + 0x328], ax
push 0x206
push eax
lea eax, [esp + 0x332]
push eax
call fcn.004164f0
add esp, 0xc
lea eax, [esp + 0x328]
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x2c]
push eax
push 0
push 0x3a8
call dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
lea eax, [esp + 0x328]
push eax
push esi
call dword [sym.imp.SHELL32.dll_SHCreateDirectory]
push 0x3ff
lea eax, [esp + 0xb4d]
mov byte [esp + 0xb4c], 0
push 0
push eax
call fcn.004164f0
mov ecx, dword [esp + 0x20]
add esp, 0xc
add ecx, 0x400
mov esi, ecx
lea edx, [esi + 1]
lea esp, [esp]
mov al, byte [esi]
inc esi
test al, al
jne 0x40bae0
sub esi, edx
lea eax, [esp + 0xb48]
push esi
push ecx
push eax
call fcn.004171f0
add esp, 0xc
lea eax, [esp + 0xb48]
push 0x43490c
push eax
call fcn.004133c0
add esp, 8
test eax, eax
je 0x40bb1c
mov dword [eax], 0x6f63692e
jmp 0x40bb27
mov dword [esp + esi + 0xb48], 0x6f63692e
lea eax, [esp + 0xb48]
push eax
lea eax, [esp + 0x24]
push 0x104
push eax
call fcn.00413090
add esp, 0xc
lea eax, [esp + 0x20]
push 0x434910
push eax
lea eax, [esp + 0x20]
push eax
call fcn.00413b3a
mov eax, dword [esp + 0x24]
add esp, 0xc
test eax, eax
je 0x40bb76
push eax
push ebx
push 1
push edi
call fcn.004142c9
push dword [esp + 0x28]
call fcn.004140f9
add esp, 0x14
mov edi, dword [sym.imp.KERNEL32.dll_MultiByteToWideChar]
mov ebx, dword [esp + 0x14]
push 0x104
lea eax, [esp + 0x534]
push eax
push 0xffffffffffffffff
lea eax, [esp + 0x2c]
push eax
push 0
push 0x3a8
call edi
push 0x104
lea eax, [esp + 0xf4c]
push 0
push eax
call fcn.004164f0
add esp, 0xc
lea eax, [esp + 0x940]
push 0x104
push 0
push eax
call fcn.004164f0
add esp, 0xc
lea eax, [esp + 0xf48]
push 0x104
push eax
push 0xffffffffffffffff
lea eax, [ebx + 0x400]
push eax
push 0
push 0x3a8
call edi
lea eax, [esp + 0xf48]
push eax
lea eax, [esp + 0x12c]
push 0x100
push eax
call fcn.00414a37
add esp, 0xc
lea eax, [esp + 0x940]
push 0x104
push eax
push 0xffffffffffffffff
push ebx
push 0
push 0x3a8
call edi
lea eax, [esp + 0x940]
push eax
lea eax, [esp + 0x534]
push eax
lea edx, [esp + 0x130]
lea ecx, [esp + 0x740]
call fcn.0040ce60
add esp, 8
mov byte [ebx + 0x142f], 1
mov ecx, dword [esp + 0x1554]
pop edi
pop esi
pop ebx
xor ecx, esp
call fcn.00412a47
mov esp, ebp
pop ebp
ret
lea eax, [esp + 0x1150]
push eax
lea eax, [esp + 0x24]
push 0x104
push eax
call fcn.00412f97
add esp, 0xc
jmp 0x40bb80