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

Disassembly:
push 0xffffffffffffffff
push 0x40fb9f
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x130
push ebx
push esi
push edi
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::CString_3
lea ecx, [esp + 0x18]
mov dword [esp + 0x144], 0
call sub.MFC42.DLL_CString::CString_3
lea ecx, [esp + 0x14]
mov byte [esp + 0x144], 1
call sub.MFC42.DLL_CString::CString_3
lea ecx, [esp + 0x2c]
mov byte [esp + 0x144], 2
call sub.MFC42.DLL_CString::CString_3
lea ecx, [esp + 0x28]
mov byte [esp + 0x144], 3
call sub.MFC42.DLL_CString::CString_3
lea ecx, [esp + 0x20]
mov byte [esp + 0x144], 4
call sub.MFC42.DLL_CString::CString_3
mov eax, dword [esp + 0x14c]
mov byte [esp + 0x144], 5
mov esi, dword [eax + 8]
test esi, esi
je 0x40d18f
mov edi, dword [sym.imp.MSVCRT.dll__mbscmp]
push esi
lea ecx, [esp + 0x1c]
call sub.MFC42.DLL_CString::operator
lea ecx, [esi + 0xc]
push ecx
lea ecx, [esp + 0x18]
call sub.MFC42.DLL_CString::operator
mov edx, dword [esp + 0x18]
push str.text
push edx
call edi
add esp, 8
test eax, eax
jne 0x40d124
lea eax, [esp + 0x14]
lea ecx, [esp + 0x2c]
push eax
jmp 0x40d17c
mov ecx, dword [esp + 0x18]
push str.href
push ecx
call edi
add esp, 8
test eax, eax
jne 0x40d142
lea edx, [esp + 0x14]
lea ecx, [esp + 0x28]
push edx
jmp 0x40d17c
mov eax, dword [esp + 0x18]
push str.icon
push eax
call edi
add esp, 8
test eax, eax
jne 0x40d160
lea ecx, [esp + 0x14]
push ecx
lea ecx, [esp + 0x24]
jmp 0x40d17c
mov edx, dword [esp + 0x18]
push 0x415f00
push edx
call edi
add esp, 8
test eax, eax
jne 0x40d181
lea eax, [esp + 0x14]
lea ecx, [esp + 0x1c]
push eax
call fcn.0040e364
mov esi, dword [esi + 0x10c]
test esi, esi
jne 0x40d0ef
mov ecx, dword [esp + 0x28]
mov eax, dword [ecx - 8]
test eax, eax
jle 0x40d26a
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_3
lea edx, [esp + 0x20]
lea eax, [esp + 0x24]
push edx
mov bl, 6
push 0x41615c
push eax
mov byte [esp + 0x150], bl
call sub.MFC42.DLL_operator
push eax
lea ecx, [esp + 0x14]
mov byte [esp + 0x148], 7
call fcn.0040e364
lea ecx, [esp + 0x24]
mov byte [esp + 0x144], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x28]
lea edx, [esp + 0xc]
push ecx
push 0x41615c
push edx
call sub.MFC42.DLL_operator
push ecx
lea eax, [esp + 0x14]
mov ecx, esp
mov dword [esp + 0x34], esp
push eax
mov byte [esp + 0x14c], 8
call sub.MFC42.DLL_CString::CString_1
push 0x416028
mov ecx, 0x41615c
mov byte [esp + 0x14c], 8
call fcn.0040aed0
push eax
lea ecx, [esp + 0x18]
call fcn.0040aed0
push eax
lea ecx, [esp + 0x3c]
call fcn.0040aed0
push eax
push 0
call fcn.00402c90
add esp, 0x18
lea ecx, [esp + 0xc]
mov byte [esp + 0x144], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x144], 5
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x1c]
mov eax, dword [ecx - 8]
test eax, eax
jle 0x40d408
lea edx, [esp + 0x34]
push edx
push 0
push 0
call dword [sym.imp.SHELL32.dll_SHGetSpecialFolderLocation]
mov ecx, dword [esp + 0x34]
lea eax, [esp + 0x38]
push eax
push ecx
call dword [sym.imp.SHELL32.dll_SHGetPathFromIDListA]
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::CString_3
lea edx, [esp + 0x38]
mov bl, 0xa
push edx
lea ecx, [esp + 0x14]
mov byte [esp + 0x148], bl
call sub.MFC42.DLL_CString::operator
push 0x415f6c
lea ecx, [esp + 0x14]
call fcn.0040e5d4
lea eax, [esp + 0x2c]
lea ecx, [esp + 0x10]
push eax
call sub.MFC42.DLL_CString::operator_1
push str..url
lea ecx, [esp + 0x14]
call fcn.0040e5d4
mov ecx, dword [esp + 0x10]
push 0
push 0x80
push 2
push 0
push 0
push 0x40000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
je 0x40d3f7
lea ecx, [esp + 0xc]
call sub.MFC42.DLL_CString::CString_3
push str.http:__
lea ecx, [esp + 0x20]
mov byte [esp + 0x148], 0xb
call sub.MFC42.DLL_CString::Find_1
cmp eax, 0xffffffff
jne 0x40d343
push str._InternetShortcut__r_nURLhttp:__
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator
lea edx, [esp + 0x1c]
push edx
jmp 0x40d356
push str._InternetShortcut__r_nURL
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator
lea eax, [esp + 0x1c]
push eax
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator_1
mov ecx, dword [esp + 0x20]
mov eax, dword [ecx - 8]
test eax, eax
jle 0x40d3c1
lea edx, [esp + 0x20]
lea eax, [esp + 0x24]
push edx
push 0x41615c
push eax
call sub.MFC42.DLL_operator
push str._r_nIconFile
lea ecx, [esp + 0x10]
mov byte [esp + 0x148], 0xc
call fcn.0040e5d4
lea ecx, [esp + 0x24]
push ecx
lea ecx, [esp + 0x10]
call sub.MFC42.DLL_CString::operator_1
push str._r_nIconIndex0
lea ecx, [esp + 0x10]
call fcn.0040e5d4
lea ecx, [esp + 0x24]
mov byte [esp + 0x144], 0xb
call sub.MFC42.DLL_CString::CString
mov eax, dword [esp + 0xc]
mov dword [esp + 0x30], 0
lea edx, [esp + 0x30]
push 0
mov ecx, dword [eax - 8]
push edx
push ecx
push eax
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea ecx, [esp + 0xc]
mov byte [esp + 0x144], bl
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x10]
mov byte [esp + 0x144], 5
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x20]
mov byte [esp + 0x144], 4
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x28]
mov byte [esp + 0x144], 3
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x2c]
mov byte [esp + 0x144], 2
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x14]
mov byte [esp + 0x144], 1
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x18]
mov byte [esp + 0x144], 0
call sub.MFC42.DLL_CString::CString
lea ecx, [esp + 0x1c]
mov dword [esp + 0x144], 0xffffffff
call sub.MFC42.DLL_CString::CString
mov ecx, dword [esp + 0x13c]
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
add esp, 0x13c
ret 4