Function at 0x40b4a0
Capabilities:
Copy file
Delete file
Get common file path
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x78c
push edi
mov eax, dword [str.Image]
mov dword [ebp - 0x110], eax
mov cx, word [0x426080]
mov word [ebp - 0x10c], cx
mov ecx, 0x3f
xor eax, eax
lea edi, [ebp - 0x10a]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
mov dl, byte [0x4255dc]
mov byte [ebp - 0x220], dl
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x21f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [0x4255dc]
mov byte [ebp - 0x328], al
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x327]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov dword [ebp - 0x114], 0
mov dword [ebp - 0x724], str.._amcap.cpp
mov dword [ebp - 0x720], 0x1954
mov dword [ebp - 0x71c], 0x1000
push str.Save2Disk
lea ecx, [ebp - 0x724]
push ecx
call fcn.00405c70
add esp, 8
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
lea eax, [ebp + eax - 0x220]
mov dword [ebp - 4], eax
jmp 0x40b56d
mov ecx, dword [ebp - 4]
sub ecx, 1
mov dword [ebp - 4], ecx
mov edx, dword [ebp - 4]
lea eax, [ebp - 0x220]
cmp edx, eax
jbe 0x40b590
mov ecx, dword [ebp - 4]
movsx edx, byte [ecx]
cmp edx, 0x5c
jne 0x40b58e
mov eax, dword [ebp - 4]
mov byte [eax + 1], 0
jmp 0x40b590
jmp 0x40b564
mov byte [ebp - 0x11d], 0
cmp dword [ebp + 8], 0
jne 0x40bcc0
lea ecx, [ebp - 0x338]
push ecx
call fcn.0040d3d0
add esp, 4
test eax, eax
jne 0x40b5ed
mov dword [ebp - 0x730], str.._amcap.cpp
mov dword [ebp - 0x72c], 0x1968
mov dword [ebp - 0x728], 0x100
push str.GetPreviewMediaType_fail
lea edx, [ebp - 0x730]
push edx
call fcn.00405c70
add esp, 8
xor eax, eax
jmp 0x40bf01
push 0x10
lea eax, [ebp - 0x338]
push eax
push 0x426acc
call fcn.004197e0
add esp, 0xc
neg eax
sbb eax, eax
inc eax
je 0x40ba91
mov dword [ebp - 0x73c], str.._amcap.cpp
mov dword [ebp - 0x738], 0x196d
mov dword [ebp - 0x734], 0x1000
push str.Save2Disk_YUY2
lea ecx, [ebp - 0x73c]
push ecx
call fcn.00405c70
add esp, 8
lea edx, [ebp - 0x468]
push edx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push str.stiraw.bmp
lea eax, [ebp - 0x468]
push eax
call fcn.00419f50
add esp, 8
push 0x19bfcc0
call fcn.0041aba9
add esp, 4
mov dword [ebp - 0x740], eax
mov ecx, dword [ebp - 0x740]
mov dword [ebp - 0x484], ecx
push 0x19bfcc0
call fcn.0041aba9
add esp, 4
mov dword [ebp - 0x744], eax
mov edx, dword [ebp - 0x744]
mov dword [ebp - 0x494], edx
push 0x19bfcc0
call fcn.0041aba9
add esp, 4
mov dword [ebp - 0x748], eax
mov eax, dword [ebp - 0x748]
mov dword [ebp - 0x480], eax
cmp dword [0x42f838], 0
jne 0x40b6eb
push 0x44aa200
call fcn.0041aba9
add esp, 4
mov dword [ebp - 0x74c], eax
mov ecx, dword [ebp - 0x74c]
mov dword [0x42f838], ecx
push 0x19bfcc0
push 0
mov edx, dword [ebp - 0x484]
push edx
call fcn.00419e10
add esp, 0xc
push 0x19bfcc0
push 0
mov eax, dword [ebp - 0x494]
push eax
call fcn.00419e10
add esp, 0xc
push 0x19bfcc0
push 0
mov ecx, dword [ebp - 0x480]
push ecx
call fcn.00419e10
add esp, 0xc
push 0x44aa200
push 0
mov edx, dword [0x42f838]
push edx
call fcn.00419e10
add esp, 0xc
lea eax, [ebp - 0x488]
push eax
lea ecx, [ebp - 0x48c]
push ecx
call fcn.00405790
add esp, 8
mov edx, dword [ebp - 0x488]
push edx
mov eax, dword [ebp - 0x48c]
push eax
mov ecx, dword [ebp - 0x480]
push ecx
mov edx, dword [ebp - 0x494]
push edx
mov eax, dword [ebp - 0x484]
push eax
mov ecx, dword [0x42c9e0]
push ecx
call fcn.0040cd30
add esp, 0x18
push 0x42b060
call fcn.0040ce00
add esp, 4
mov edx, dword [ebp - 0x488]
push edx
mov eax, dword [ebp - 0x48c]
push eax
push 0x42b060
mov ecx, dword [0x42f838]
push ecx
mov edx, dword [ebp - 0x480]
push edx
mov eax, dword [ebp - 0x494]
push eax
mov ecx, dword [ebp - 0x484]
push ecx
call fcn.0040cf70
add esp, 0x1c
lea edx, [ebp - 0x110]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 0x114], eax
lea eax, [ebp - 0x110]
push eax
lea ecx, [ebp - 0x328]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 4
push 0x4255dc
mov edx, dword [ebp - 0x114]
lea eax, [ebp + edx - 0x32c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
push str..bmp
lea ecx, [ebp - 0x328]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [ebp - 0x328]
push edx
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
je 0x40b84d
push str..bmp
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
mov dword [ebp - 0x758], str.._amcap.cpp
mov dword [ebp - 0x754], 0x198c
mov dword [ebp - 0x750], 0x1000
lea edx, [ebp - 0x110]
push edx
push str.delete_and_recreate_file:__s_
lea eax, [ebp - 0x758]
push eax
call fcn.00405c70
add esp, 0xc
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea edx, [ebp - 0x468]
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x47c], eax
cmp dword [ebp - 0x47c], 0xffffffff
jne 0x40b8fe
mov dword [ebp - 0x764], str.._amcap.cpp
mov dword [ebp - 0x760], 0x1994
mov dword [ebp - 0x75c], 0x100
lea eax, [ebp - 0x468]
push eax
push str.CreateFile_fail:__s_
lea ecx, [ebp - 0x764]
push ecx
call fcn.00405c70
add esp, 0xc
xor eax, eax
jmp 0x40bf01
push 0xe
push 0
lea edx, [ebp - 0x478]
push edx
call fcn.00419e10
add esp, 0xc
mov word [ebp - 0x478], 0x4d42
mov eax, dword [ebp - 0x48c]
imul eax, dword [ebp - 0x488]
imul eax, eax, 3
add eax, 0x36
mov dword [ebp - 0x476], eax
mov dword [ebp - 0x46e], 0x36
mov dword [ebp - 0x490], 0
push 0
lea ecx, [ebp - 0x490]
push ecx
push 0xe
lea edx, [ebp - 0x478]
push edx
mov eax, dword [ebp - 0x47c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x28
push 0
lea ecx, [ebp - 0x360]
push ecx
call fcn.00419e10
add esp, 0xc
mov dword [ebp - 0x360], 0x28
mov edx, dword [ebp - 0x48c]
mov dword [ebp - 0x35c], edx
mov eax, dword [ebp - 0x488]
neg eax
mov dword [ebp - 0x358], eax
mov word [ebp - 0x354], 1
mov word [ebp - 0x352], 0x18
mov dword [ebp - 0x490], 0
push 0
lea ecx, [ebp - 0x490]
push ecx
push 0x28
lea edx, [ebp - 0x360]
push edx
mov eax, dword [ebp - 0x47c]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x490], 0
mov ecx, dword [ebp - 0x488]
push ecx
mov edx, dword [ebp - 0x48c]
imul edx, edx, 3
push edx
mov eax, dword [0x42f838]
push eax
call fcn.0040d470
add esp, 0xc
push 0
lea ecx, [ebp - 0x490]
push ecx
mov edx, dword [ebp - 0x48c]
imul edx, dword [ebp - 0x488]
imul edx, edx, 3
push edx
mov eax, dword [0x42f838]
push eax
mov ecx, dword [ebp - 0x47c]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edx, dword [ebp - 0x47c]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x494]
mov dword [ebp - 0x768], eax
mov ecx, dword [ebp - 0x768]
push ecx
call fcn.00419697
add esp, 4
mov edx, dword [ebp - 0x480]
mov dword [ebp - 0x76c], edx
mov eax, dword [ebp - 0x76c]
push eax
call fcn.00419697
add esp, 4
mov ecx, dword [ebp - 0x484]
mov dword [ebp - 0x770], ecx
mov edx, dword [ebp - 0x770]
push edx
call fcn.00419697
add esp, 4
jmp 0x40bc84
push 0x10
lea eax, [ebp - 0x338]
push eax
push 0x426abc
call fcn.004197e0
add esp, 0xc
neg eax
sbb eax, eax
inc eax
je 0x40bc84
mov dword [ebp - 0x5b0], 0
lea ecx, [ebp - 0x5a0]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push str.stiraw.jpg
lea edx, [ebp - 0x5a0]
push edx
call fcn.00419f50
add esp, 8
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea eax, [ebp - 0x5a0]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x5a8], eax
cmp dword [ebp - 0x5a8], 0xffffffff
jne 0x40bb4d
mov dword [ebp - 0x77c], str.._amcap.cpp
mov dword [ebp - 0x778], 0x19c7
mov dword [ebp - 0x774], 0x100
lea ecx, [ebp - 0x5a0]
push ecx
push str.CreateFile_fail:__s_
lea edx, [ebp - 0x77c]
push edx
call fcn.00405c70
add esp, 0xc
xor eax, eax
jmp 0x40bf01
push 0
lea eax, [ebp - 0x5b0]
push eax
mov ecx, dword [0x42c7cc]
push ecx
mov edx, dword [0x42c9e0]
push edx
mov eax, dword [ebp - 0x5a8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x5a8]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [0x42c060], 0
je 0x40bb94
mov edx, dword [0x42c060]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov eax, dword [0x42c7cc]
push eax
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [0x42c060], eax
mov dword [ebp - 0x5a4], 0
mov ecx, dword [0x42c060]
push ecx
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x5a4], eax
cmp dword [ebp - 0x5a4], 0
je 0x40bbe9
mov edx, dword [0x42c7cc]
push edx
mov eax, dword [0x42c9e0]
push eax
mov ecx, dword [ebp - 0x5a4]
push ecx
call fcn.0041a310
add esp, 0xc
mov edx, dword [0x42c060]
push edx
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
cmp dword [0x42f840], 0
je 0x40bc10
mov eax, dword [0x42f840]
mov ecx, dword [eax]
mov edx, dword [0x42f840]
push edx
call dword [ecx + 8]
cmp dword [0x42f83c], 0
je 0x40bc49
mov eax, dword [0x42f83c]
mov dword [ebp - 0x780], eax
cmp dword [ebp - 0x780], 0
je 0x40bc49
mov dword [0x42f83c], 0
mov ecx, dword [ebp - 0x780]
mov edx, dword [ecx]
mov eax, dword [ebp - 0x780]
push eax
call dword [edx + 8]
push 0x42f840
push 0
mov ecx, dword [0x42c060]
push ecx
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov dword [ebp - 0x5ac], eax
push 0x42f83c
push 0x426b3c
push 0
push 0
mov edx, dword [0x42f840]
push edx
call dword [sym.imp.OLEPRO32.DLL_OleLoadPicture]
mov dword [ebp - 0x5ac], eax
cmp dword [0x42f828], 0
je 0x40bc9f
push 5
push 0
push 0
mov eax, dword [0x42f828]
push eax
call dword [sym.imp.USER32.dll_RedrawWindow]
cmp dword [0x42f82c], 0
je 0x40bcbb
push 5
push 0
push 0
mov ecx, dword [0x42f82c]
push ecx
call dword [sym.imp.USER32.dll_RedrawWindow]
jmp 0x40befc
push 0x58
push 0
lea edx, [ebp - 0x608]
push edx
call fcn.00419e10
add esp, 0xc
mov dword [ebp - 0x608], 0x58
mov eax, dword [0x42f828]
mov dword [ebp - 0x604], eax
mov ecx, dword [0x42c06c]
mov dword [ebp - 0x600], ecx
mov edx, dword [0x42cbe8]
mov eax, dword [edx*4 + 0x42c9e8]
add eax, 0x10
mov dword [ebp - 0x784], eax
push 0x10
mov ecx, dword [ebp - 0x784]
push ecx
push 0x426acc
call fcn.004197e0
add esp, 0xc
neg eax
sbb eax, eax
inc eax
je 0x40bd33
mov dword [ebp - 0x5fc], str.Bitmap_Files_.bmp_
jmp 0x40bd7c
mov edx, dword [0x42cbe8]
mov eax, dword [edx*4 + 0x42c9e8]
add eax, 0x10
mov dword [ebp - 0x788], eax
push 0x10
mov ecx, dword [ebp - 0x788]
push ecx
push 0x426abc
call fcn.004197e0
add esp, 0xc
neg eax
sbb eax, eax
inc eax
je 0x40bd72
mov dword [ebp - 0x5fc], str.Jpg_Files_.jpg_
jmp 0x40bd7c
mov dword [ebp - 0x5fc], str.Unknown_format_Raw_data_.raw_
mov dword [ebp - 0x5f0], 0
lea edx, [ebp - 0x110]
mov dword [ebp - 0x5ec], edx
mov dword [ebp - 0x5e8], 0x104
mov dword [ebp - 0x5e4], 0
mov dword [ebp - 0x5d8], str.Save_File
mov dword [ebp - 0x5e0], 0
lea eax, [ebp - 0x220]
mov dword [ebp - 0x5dc], eax
mov dword [ebp - 0x5d4], 0x8804
lea ecx, [ebp - 0x608]
push ecx
call dword [sym.imp.comdlg32.dll_GetSaveFileNameA]
test eax, eax
je 0x40bef8
mov dword [ebp - 0x60c], 0
lea edx, [ebp - 0x110]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 0x114], eax
mov eax, dword [0x42cbe8]
mov ecx, dword [eax*4 + 0x42c9e8]
add ecx, 0x10
mov dword [ebp - 0x78c], ecx
push 0x10
mov edx, dword [ebp - 0x78c]
push edx
push 0x426abc
call fcn.004197e0
add esp, 0xc
neg eax
sbb eax, eax
inc eax
je 0x40beaa
push str..jpg
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
lea ecx, [ebp - 0x110]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x610], eax
cmp dword [ebp - 0x610], 0xffffffff
jne 0x40be78
xor eax, eax
jmp 0x40bf01
push 0
lea edx, [ebp - 0x60c]
push edx
mov eax, dword [0x42c7cc]
push eax
mov ecx, dword [0x42c9e0]
push ecx
mov edx, dword [ebp - 0x610]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x610]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40bef6
lea ecx, [ebp - 0x718]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
push str.stiraw.bmp
lea edx, [ebp - 0x718]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push str..bmp
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
lea ecx, [ebp - 0x110]
push ecx
lea edx, [ebp - 0x718]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
jmp 0x40befc
xor eax, eax
jmp 0x40bf01
mov eax, 1
pop edi
mov esp, ebp
pop ebp
ret