Function at 0x40ce60
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4374fb
mov eax, dword fs:[0]
push eax
sub esp, 0x80
push ebx
push esi
push edi
mov eax, dword [0x47700c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0x14], ecx
mov ebx, dword [ebp + 8]
test ebx, ebx
je 0x40d0a5
mov edx, 0x4579d0
mov ecx, ebx
call fcn.00401f50
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
lea ecx, [ebp - 0x8c]
push 1
push 1
push 1
push 0x400
call fcn.00408260
push 1
push 1
push 1
push pe_nt_image_headers32
lea ecx, [ebp - 0x74]
mov dword [ebp - 4], 0
call fcn.00408260
mov ecx, ebx
mov byte [ebp - 4], 1
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40cee8
push 0
sub esp, 8
sub ecx, edx
push 1
lea eax, [ecx + 1]
push eax
push ebx
lea ecx, [ebp - 0x2c]
call fcn.00408110
lea ecx, [ebp - 0x2c]
mov byte [ebp - 4], 2
call fcn.00412450
push eax
lea ecx, [ebp - 0x5c]
call fcn.004089f0
mov byte [ebp - 4], 4
cmp byte [ebp - 0x1c], 0
jne 0x40cf2f
push dword [ebp - 0x18]
call fcn.0043575c
add esp, 4
mov edi, dword [ebp - 0x60]
mov ebx, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll___acrt_iob_func]
call fcn.00401d80
push eax
push 0x5c
call fcn.00404240
push eax
push str._s_c_s.pnm
push dword [ebp - 0x74]
push edi
call fcn.004012c0
add esp, 0x18
mov edx, 0x4579d0
mov ecx, edi
call fcn.00404110
mov esi, eax
test esi, esi
je 0x40cf9f
push 0
call ebx
add esp, 4
cmp esi, eax
je 0x40cf9b
push 1
call ebx
add esp, 4
cmp esi, eax
je 0x40cf9b
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
test eax, eax
je 0x40cf9b
push eax
push str.cimg::fclose__:_Error_code__d_returned_during_file_closing.
call fcn.00401b40
add esp, 8
test esi, esi
jne 0x40cf38
test edi, edi
jne 0x40cfb8
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov dword [ebp - 0x38], edi
mov byte [ebp - 0x34], 0
mov dword [ebp - 0x30], edi
jmp 0x40cfdd
mov ecx, edi
lea edx, [ecx + 1]
nop dword [eax]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40cfc0
push 0
sub esp, 8
sub ecx, edx
push 1
lea eax, [ecx + 1]
push eax
push edi
lea ecx, [ebp - 0x44]
call fcn.00408110
lea ecx, [ebp - 0x44]
mov byte [ebp - 4], 5
call fcn.00412450
push dword [eax + 0x14]
push dword [ebp - 0x48]
call fcn.00405290
mov ebx, dword [ebp - 0x78]
push eax
push str._s_convert___s____s_
push dword [ebp - 0x8c]
push ebx
call fcn.004012c0
add esp, 0x18
mov byte [ebp - 4], 4
cmp byte [ebp - 0x34], 0
jne 0x40d021
push dword [ebp - 0x30]
call fcn.0043575c
add esp, 4
call fcn.00405290
mov edx, eax
mov ecx, ebx
call fcn.00401be0
mov edx, 0x4579d0
mov ecx, edi
call fcn.00404110
test eax, eax
je 0x40d0ea
mov ecx, eax
call fcn.004020a0
mov esi, dword [ebp - 0x14]
push edi
push ecx
mov ecx, esi
call fcn.00410590
push edi
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 4
cmp byte [ebp - 0x4c], 0
jne 0x40d071
push dword [ebp - 0x48]
call fcn.0043575c
add esp, 4
cmp byte [ebp - 0x64], 0
jne 0x40d080
push edi
call fcn.0043575c
add esp, 4
cmp byte [ebp - 0x7c], 0
jne 0x40d08f
push ebx
call fcn.0043575c
add esp, 4
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
call fcn.00401920
cmp byte [ecx + 0x10], 0
mov edx, str.non_
push eax
mov eax, 0x4393e2
cmove eax, edx
push eax
push dword [ecx + 0x14]
lea eax, [ebp - 0x24]
push dword [ecx + 0xc]
push dword [ecx + 8]
push dword [ecx + 4]
push dword [ecx]
push str._instance__u__u__u__u__p__sshared___CImg__s_::load_graphicsmagick_external__:_Specified_filename_is__null_.
push eax
call fcn.00401450
add esp, 0x24
lea eax, [ebp - 0x24]
push 0x475714
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
mov esi, dword [ebp + 8]
mov edx, 0x457fc0
mov ecx, esi
call fcn.00401f50
mov ecx, eax
call fcn.004020a0
push esi
call fcn.00401920
mov esi, dword [ebp - 0x14]
mov ecx, str.non_
push eax
mov eax, 0x4393e2
cmp byte [esi + 0x10], 0
cmove eax, ecx
push eax
push dword [esi + 0x14]
lea eax, [ebp - 0x3c]
push dword [esi + 0xc]
push dword [esi + 8]
push dword [esi + 4]
push dword [esi]
push str._instance__u__u__u__u__p__sshared___CImg__s_::load_graphicsmagick_external__:_Failed_to_load_file__s_with_external_command_gm.
push eax
call fcn.00401780
add esp, 0x28
lea eax, [ebp - 0x3c]
push 0x47569c
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3