Function at 0x3953f0
Capabilities:
Create directory
Parse pe header
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x120
mov eax, dword [section..data]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
mov esi, edx
mov dword [ebp - 0x120], eax
push edi
lea eax, [ebp - 0x110]
mov dword [ebp - 0x118], 0
mov ebx, 1
push dword [esi]
push 0x3a7ef4
push 0x104
push eax
call fcn.00395c7a
lea eax, [ebp - 0x110]
push eax
push 0x3a7ef4
push 0
call fcn.00393e00
add esp, 0x1c
test eax, eax
jne 0x3954b9
lea eax, [ebp - 0x110]
push eax
push eax
push str.File__s_NOT_exist__now_try__s.exe
call fcn.00393880
add esp, 0xc
lea eax, [ebp - 0x110]
push dword [esi]
push str._s.exe
push 0x104
push eax
call fcn.00395c7a
lea eax, [ebp - 0x110]
push eax
push 0x3a7ef4
push 0
call fcn.00393e00
add esp, 0x1c
mov edx, 0x3a8a54
test eax, eax
mov ecx, 0x3a8a50
lea eax, [ebp - 0x110]
cmove ecx, edx
push ecx
push eax
push str.File__s_exist____s
call fcn.00393880
add esp, 0xc
lea eax, [ebp - 0x11c]
push eax
lea edx, [ebp - 0x118]
lea ecx, [ebp - 0x110]
call fcn.00393bc0
mov esi, dword [ebp - 0x118]
add esp, 4
test eax, eax
jne 0x3955b4
cmp byte [esi], 0x4d
jne 0x395508
cmp byte [esi + 1], 0x5a
jne 0x395508
mov ecx, dword [esi + 0x3c]
cmp dword [ecx + esi], 0x4550
jne 0x395508
mov edx, 0x20b
cmp word [ecx + esi + 0x18], dx
sete al
jmp 0x39550a
xor eax, eax
push str.ventoy
push 1
mov dword [0x3abf78], eax
call fcn.00393e00
add esp, 8
test eax, eax
jne 0x39554e
push eax
push str.ventoy
call dword [sym.imp.KERNEL32.dll_CreateDirectoryA]
test eax, eax
jne 0x39554e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Failed_to_create_ventoy_directory_err:_u
call fcn.00393880
mov esi, dword [ebp - 0x118]
add esp, 8
jmp 0x3955b4
mov edi, dword [ebp - 0x11c]
xor ebx, ebx
test edi, edi
je 0x39559c
lea ebx, [ebx]
lea ecx, [ebx + esi]
call fcn.00393ce0
test eax, eax
je 0x395595
cmp byte [ebx + esi + 0x600], 0x4d
lea ecx, [ebx + esi]
jne 0x395595
cmp byte [ecx + 0x601], 0x5a
jne 0x395595
mov eax, dword [ecx + 0x63c]
cmp dword [ecx + eax + 0x600], 0x4550
je 0x3955d4
add ebx, 0x10
cmp ebx, edi
jb 0x395560
mov esi, dword [ebp - 0x118]
push str.OS_param_not_found
call fcn.00393880
mov ebx, 1
add esp, 4
test esi, esi
je 0x3955c1
push esi
call fcn.00395c96
add esp, 4
mov ecx, dword [ebp - 4]
mov eax, ebx
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.003959f4
mov esp, ebp
pop ebp
ret
push ebx
push str.Find_os_pararm_at__u
call fcn.00393880
lea eax, [ebx + esi]
mov ecx, 0x80
mov esi, eax
mov edi, 0x3ad0b0
rep movsd dword es:[edi], dword [esi]
movdqu xmm1, xmmword [0x3ad271]
lea esi, [eax + 0x200]
mov ecx, 0x100
movdqu xmm0, xmmword [0x3ad281]
mov edi, 0x3acc88
add esp, 8
movd eax, xmm1
rep movsd dword es:[edi], dword [esi]
movdqu xmmword [0x3ad088], xmm1
movdqu xmmword [0x3ad098], xmm0
cmp al, 1
jne 0x395642
push str.break_here_for_debug_.....
call fcn.00393880
mov esi, dword [ebp - 0x118]
jmp 0x3955ac
xor eax, eax
mov cl, byte [eax + 0x3ad0dd]
test cl, cl
je 0x395662
cmp cl, 0x2f
jne 0x39565a
mov byte [eax + 0x3ad0dd], 0x5c
inc eax
cmp eax, 0x180
jb 0x395644
lea eax, [ebp - 0x110]
add ebx, 0x600
push 0x3a8a20
push eax
call fcn.00395d60
add esp, 8
test eax, eax
je 0x3956bc
lea ecx, [ebp - 0x110]
lea edx, [ecx + 1]
lea esp, [esp]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x395690
sub ecx, edx
test ecx, ecx
jle 0x3956bc
lea edx, [ebp - 0x110]
mov al, byte [edx + ecx - 1]
cmp al, 0x2f
je 0x39573a
cmp al, 0x5c
je 0x39573a
dec ecx
test ecx, ecx
jg 0x3956a3
lea eax, [ebp - 0x110]
push eax
push str.ventoy_s
push 0x104
push dword [ebp - 0x120]
call fcn.00395c7a
mov edi, dword [ebp - 0x11c]
mov esi, edi
sub esi, ebx
push esi
push dword [ebp - 0x120]
push str.SaveBuffer2File___s__len:_u
call fcn.00393880
add esp, 0x1c
push 0
push 0
push 1
push 0
push 3
push 0xc0000000
push dword [ebp - 0x120]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ecx, eax
mov dword [ebp - 0x11c], ecx
cmp ecx, 0xffffffff
jne 0x395747
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Could_not_create_new_file__error:_u
call fcn.00393880
mov esi, dword [ebp - 0x118]
add esp, 8
jmp 0x39576e
lea eax, [ebp - 0x110]
add eax, ecx
jmp 0x3956c2
push 0
lea eax, [ebp - 0x114]
push eax
push esi
mov esi, dword [ebp - 0x118]
lea eax, [ebx + esi]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [ebp - 0x11c]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp ebx, edi
jae 0x3955a2
cmp byte [0x3ad088], 2
jne 0x395793
push str.skip_hook_for_debug_.....
call fcn.00393880
add esp, 4
xor ebx, ebx
jmp 0x3955b4
mov ecx, 0x3ad0b0
call fcn.003950b0
mov ebx, eax
jmp 0x3955b4