Function at 0x40c580
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x288
push edi
mov dword [ebp - 0x288], ecx
mov al, byte [0x4255dc]
mov byte [ebp - 0x110], al
mov ecx, 0x40
xor eax, eax
lea edi, [ebp - 0x10f]
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
mov cl, byte [0x4255dc]
mov byte [ebp - 0x220], cl
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 dword [ebp - 4], 0
mov dword [ebp - 0x224], 0
cmp dword [0x42f81c], 0
jne 0x40c5ec
xor eax, eax
jmp 0x40caa2
lea edx, [ebp - 0x114]
push edx
lea eax, [ebp - 0x118]
push eax
call fcn.00405790
add esp, 8
push 0x103
push 0x42c24c
mov ecx, dword [ebp - 0x288]
add ecx, 0x118
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov edx, dword [ebp - 0x288]
add edx, 0x118
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x288]
add eax, 0x118
push eax
lea ecx, [ebp - 0x220]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push 4
push 0x4255dc
mov edx, dword [ebp - 4]
lea eax, [ebp + edx - 0x224]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov ecx, dword [0x42cbe8]
mov edx, dword [ecx*4 + 0x42c9e8]
add edx, 0x10
mov dword [ebp - 0x284], edx
push 0x10
mov eax, dword [ebp - 0x284]
push eax
push 0x426abc
call fcn.004197e0
add esp, 0xc
neg eax
sbb eax, eax
inc eax
je 0x40c7db
push str..jpg
lea ecx, [ebp - 0x220]
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea edx, [ebp - 0x220]
push edx
mov eax, dword [ebp - 0x288]
add eax, 0x118
push eax
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40c6ec
mov ecx, dword [ebp - 4]
sub ecx, 3
push ecx
lea edx, [ebp - 0x220]
push edx
mov eax, dword [ebp - 0x288]
add eax, 0x118
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov ecx, dword [0x42f820]
push ecx
push str._04d.jpg
lea edx, [ebp - 0x110]
push edx
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov eax, dword [0x42f820]
add eax, 1
mov dword [0x42f820], eax
lea ecx, [ebp - 0x110]
push ecx
mov edx, dword [ebp - 0x288]
add edx, 0x118
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
push 0
push 2
push 0
push 0
push 0x40000000
mov eax, dword [ebp - 0x288]
add eax, 0x118
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x228], eax
cmp dword [ebp - 0x228], 0xffffffff
jne 0x40c7a5
mov dword [ebp - 0x274], str.._amcap.cpp
mov dword [ebp - 0x270], 0x1b67
mov dword [ebp - 0x26c], 0x100
mov ecx, dword [ebp - 0x288]
add ecx, 0x118
push ecx
push str.CopyBitmapCreateFile_fail:__s_
lea edx, [ebp - 0x274]
push edx
call fcn.00405c70
add esp, 0xc
xor eax, eax
jmp 0x40caa2
push 0
lea eax, [ebp - 0x224]
push eax
mov ecx, dword [0x42c7cc]
push ecx
mov edx, dword [0x42c9e0]
push edx
mov eax, dword [ebp - 0x228]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov ecx, dword [ebp - 0x228]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40caa0
push str..bmp
lea edx, [ebp - 0x220]
push edx
call dword [sym.imp.KERNEL32.dll_lstrcatA]
lea eax, [ebp - 0x220]
push eax
mov ecx, dword [ebp - 0x288]
add ecx, 0x118
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcmpiA]
test eax, eax
jne 0x40c82c
mov edx, dword [ebp - 4]
sub edx, 3
push edx
lea eax, [ebp - 0x220]
push eax
mov ecx, dword [ebp - 0x288]
add ecx, 0x118
push ecx
call dword [sym.imp.KERNEL32.dll_lstrcpynA]
mov edx, dword [0x42f820]
push edx
push str._04d.bmp
lea eax, [ebp - 0x110]
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0xc
mov ecx, dword [0x42f820]
add ecx, 1
mov dword [0x42f820], ecx
lea edx, [ebp - 0x110]
push edx
mov eax, dword [ebp - 0x288]
add eax, 0x118
push eax
call dword [sym.imp.KERNEL32.dll_lstrcatA]
push 0
push 0
push 3
push 0
push 0
push 0x40000000
mov ecx, dword [ebp - 0x288]
add ecx, 0x118
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x264], eax
cmp dword [ebp - 0x264], 0xffffffff
je 0x40c8e0
push 1
push str.Confirm_File_Replace
push str.Would_you_like_to_replace_the_existing_file_
mov edx, dword [0x42f828]
push edx
call dword [sym.imp.USER32.dll_MessageBoxA]
cmp eax, 2
jne 0x40c8d3
mov eax, dword [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
xor eax, eax
jmp 0x40caa2
mov ecx, dword [ebp - 0x264]
push ecx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
push 0
push 4
push 0
push 0
push 0x40000000
mov edx, dword [ebp - 0x288]
add edx, 0x118
push edx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov dword [ebp - 0x264], eax
cmp dword [ebp - 0x264], 0xffffffff
jne 0x40c956
mov dword [ebp - 0x280], str.._amcap.cpp
mov dword [ebp - 0x27c], 0x1b8c
mov dword [ebp - 0x278], 0x100
mov eax, dword [ebp - 0x288]
add eax, 0x118
push eax
push str.CopyBitmapCreateFile_fail:__s_
lea ecx, [ebp - 0x280]
push ecx
call fcn.00405c70
add esp, 0xc
xor eax, eax
jmp 0x40caa2
push 0xe
push 0
lea edx, [ebp - 0x260]
push edx
call fcn.00419e10
add esp, 0xc
mov word [ebp - 0x260], 0x4d42
mov eax, dword [ebp + 0x14]
add eax, 0x36
mov dword [ebp - 0x25e], eax
mov dword [ebp - 0x256], 0x36
mov dword [ebp - 0x268], 0
push 0
lea ecx, [ebp - 0x268]
push ecx
push 0xe
lea edx, [ebp - 0x260]
push edx
mov eax, dword [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
push 0x28
push 0
lea ecx, [ebp - 0x250]
push ecx
call fcn.00419e10
add esp, 0xc
mov dword [ebp - 0x250], 0x28
mov edx, dword [ebp - 0x118]
mov dword [ebp - 0x24c], edx
mov eax, dword [ebp - 0x114]
neg eax
mov dword [ebp - 0x248], eax
mov word [ebp - 0x244], 1
mov word [ebp - 0x242], 0x18
mov dword [ebp - 0x268], 0
push 0
lea ecx, [ebp - 0x268]
push ecx
push 0x28
lea edx, [ebp - 0x250]
push edx
mov eax, dword [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [ebp - 0x268], 0
cmp dword [0x42f838], 0
je 0x40ca65
push 0
lea ecx, [ebp - 0x268]
push ecx
mov edx, dword [ebp - 0x118]
imul edx, dword [ebp - 0x114]
imul edx, edx, 3
push edx
mov eax, dword [0x42f838]
push eax
mov ecx, dword [ebp - 0x264]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
jmp 0x40ca83
push 0
lea edx, [ebp - 0x268]
push edx
mov eax, dword [ebp + 0x14]
push eax
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp - 0x264]
push edx
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov eax, dword [ebp - 0x264]
push eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov ecx, dword [ebp - 0x288]
mov dword [ecx + 0x21c], 1
xor eax, eax
pop edi
mov esp, ebp
pop ebp
ret 0x10