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

Disassembly:
push ebp
mov ecx, 0x16
xor eax, eax
mov ebp, esp
push edi
push esi
lea edi, [ebp - 0x464]
lea esi, [ebp - 0x20c]
push ebx
sub esp, 0x4ac
rep stosd dword es:[edi], eax
lea esi, [esi]
movzx edx, word [eax + 0x41b690]
mov word [esi + eax], dx
add eax, 2
test dx, dx
jne 0x407788
cmp word [ebp - 0x20c], 0
je 0x407ad0
mov eax, esi
lea esi, [esi]
nop
add eax, 2
cmp word [eax], 0
jne 0x4077b0
cmp eax, esi
ja 0x4077cc
jmp 0x407ad0
cmp eax, esi
jbe 0x4077ef
mov ecx, eax
movzx edx, word [eax - 2]
sub eax, 2
cmp dx, 0x2e
je 0x4078ca
cmp dx, 0x5c
je 0x4078c0
cmp dx, 0x2f
jne 0x4077c8
cmp dx, 0x5c
je 0x4078b0
cmp dx, 0x2f
je 0x4078b0
xor ecx, ecx
lea ebx, [ebp - 0x40c]
jmp 0x407814
movzx edx, word [eax + ecx]
mov word [ebx + ecx], dx
add ecx, 2
test dx, dx
jne 0x407810
mov dword [esp + 4], esi
mov dword [esp], 0x100
call dword [sym.imp.kernel32.dll_GetCurrentDirectoryW]
mov eax, dword [0x41b038]
mov dword [ebp - 0x464], 0x58
sub esp, 8
mov dword [ebp - 0x448], ebx
mov dword [ebp - 0x460], eax
mov eax, dword [0x41b03c]
mov dword [ebp - 0x458], str..idl
mov dword [ebp - 0x45c], eax
lea eax, [ebp - 0x464]
mov dword [ebp - 0x444], 0x100
mov dword [ebp - 0x438], esi
mov dword [ebp - 0x430], 0x806
mov dword [ebp - 0x428], 0x410614
mov dword [esp], eax
call dword [sym.imp.comdlg32.dll_GetSaveFileNameW]
sub esp, 4
test eax, eax
jne 0x407910
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
movzx edx, word [eax + 2]
mov eax, ecx
jmp 0x407803
cmp dx, 0x2e
jne 0x4077ef
xor edx, edx
mov word [eax], dx
cmp eax, esi
ja 0x4078e4
jmp 0x407ad0
cmp eax, esi
jbe 0x4078ff
mov edi, eax
movzx edx, word [eax - 2]
sub eax, 2
cmp dx, 0x5c
setne cl
cmp dx, 0x2f
setne bl
test cl, bl
jne 0x4078e0
mov ecx, edi
jmp 0x4077ef
mov eax, dword [0x41b684]
mov esi, dword [sym.imp.user32.dll_SendMessageW]
mov dword [esp + 0xc], 0xffff0000
mov dword [esp + 8], 4
mov dword [esp + 4], 0x110a
mov dword [esp], eax
call esi
lea edx, [ebp - 0x48c]
mov ecx, 0xa
mov dword [ebp - 0x494], eax
mov edi, edx
xor eax, eax
sub esp, 0x10
rep stosd dword es:[edi], eax
mov eax, dword [ebp - 0x494]
mov dword [esp + 0xc], edx
mov dword [esp + 8], 0
mov dword [ebp - 0x488], eax
mov eax, dword [0x41b684]
mov dword [esp + 4], 0x113e
mov dword [esp], eax
call esi
mov esi, dword [ebp - 0x468]
sub esp, 0x10
mov dword [esp], ebx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 2
mov dword [esp + 4], 0x40000000
call dword [sym.imp.kernel32.dll_CreateFileW]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x407ae4
mov dword [esp + 0x1c], 0
mov ecx, dword [sym.imp.kernel32.dll_WideCharToMultiByte]
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov eax, dword [esi + 0x204]
mov dword [ebp - 0x498], ecx
mov dword [esp + 0xc], eax
mov eax, dword [esi]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0xfde9
call ecx
sub esp, 0x20
mov edi, eax
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_malloc]
mov dword [esp + 0x14], edi
mov ecx, dword [ebp - 0x498]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], eax
mov dword [ebp - 0x494], eax
mov eax, dword [esi + 0x204]
mov dword [esp + 0xc], eax
mov eax, dword [esi]
mov dword [esp + 4], 0
mov dword [esp + 8], eax
mov dword [esp], 0xfde9
call ecx
lea eax, [ebp - 0x490]
sub esp, 0x20
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x494]
mov dword [esp + 0x10], 0
mov dword [esp + 8], edi
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_WriteFile]
sub esp, 0x14
test eax, eax
je 0x407ac2
mov eax, dword [ebp - 0x494]
mov dword [esp], eax
call dword [sym.imp.ucrtbase.dll_free]
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
call fcn.004076a0
jmp 0x407a9f
xor eax, eax
lea ebx, [ebp - 0x40c]
mov word [ebp - 0x40c], ax
jmp 0x407820
call fcn.004076a0
jmp 0x40789e