Function at 0x40caf0
Capabilities:
Delete file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4374ab
mov eax, dword fs:[0]
push eax
sub esp, 0x88
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 esi, dword [ebp + 8]
test esi, esi
je 0x40cdaf
mov edx, 0x4579d0
mov ecx, esi
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 - 0x30]
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 - 0x90]
mov dword [ebp - 4], 0
call fcn.00408260
mov ecx, esi
mov byte [ebp - 4], 1
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40cb78
push 0
sub esp, 8
sub ecx, edx
push 1
lea eax, [ecx + 1]
push eax
push esi
lea ecx, [ebp - 0x60]
call fcn.00408110
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], 2
call fcn.00412450
push eax
lea ecx, [ebp - 0x78]
call fcn.004089f0
mov byte [ebp - 4], 4
cmp byte [ebp - 0x50], 0
jne 0x40cbbf
push dword [ebp - 0x4c]
call fcn.0043575c
add esp, 4
mov edi, dword [ebp - 0x7c]
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 - 0x90]
push edi
call fcn.004012c0
add esp, 0x18
mov edx, 0x4579d0
mov ecx, edi
call fcn.00404110
mov esi, eax
test esi, esi
je 0x40cc32
push 0
call ebx
add esp, 4
cmp esi, eax
je 0x40cc2e
push 1
call ebx
add esp, 4
cmp esi, eax
je 0x40cc2e
push esi
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
test eax, eax
je 0x40cc2e
push eax
push str.cimg::fclose__:_Error_code__d_returned_during_file_closing.
call fcn.00401b40
add esp, 8
test esi, esi
jne 0x40cbc8
test edi, edi
jne 0x40cc4b
mov dword [ebp - 0x48], edi
mov dword [ebp - 0x44], edi
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x3c], edi
mov byte [ebp - 0x38], 0
mov dword [ebp - 0x34], edi
jmp 0x40cc6d
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40cc50
push 0
sub esp, 8
sub ecx, edx
push 1
lea eax, [ecx + 1]
push eax
push edi
lea ecx, [ebp - 0x48]
call fcn.00408110
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 5
call fcn.00412450
mov ebx, dword [ebp + 8]
mov eax, dword [eax + 0x14]
mov dword [ebp - 0x18], eax
mov eax, ebx
mov esi, eax
test eax, eax
je 0x40cc9b
push 0x2e
push eax
call dword [sym.imp.VCRUNTIME140.dll_strchr]
inc eax
add esp, 8
cmp eax, ebx
jae 0x40cc84
cmp esi, ebx
jne 0x40ccb0
mov ecx, ebx
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x40cca4
sub ecx, edx
lea esi, [ecx + ebx]
test esi, esi
jne 0x40ccb9
lea eax, [esi - 1]
jmp 0x40cce4
mov edx, esi
lea ecx, [edx + 1]
nop
mov al, byte [edx]
inc edx
test al, al
jne 0x40ccc0
sub edx, ecx
mov eax, 3
cmp edx, eax
mov ecx, esi
cmovl eax, edx
mov edx, 0x459708
inc eax
push eax
call fcn.00401ca0
add esp, 4
push dword [ebp - 0x18]
test eax, eax
mov edx, 0x4393e2
push dword [ebp - 0x64]
mov ecx, str.__density_400x400
cmovne ecx, edx
push ecx
call fcn.004047e0
mov esi, dword [ebp - 0x1c]
push eax
push str._s_s___s____s_
push dword [ebp - 0x30]
push esi
call fcn.004012c0
add esp, 0x1c
mov byte [ebp - 4], 4
cmp byte [ebp - 0x38], 0
jne 0x40cd29
push dword [ebp - 0x34]
call fcn.0043575c
add esp, 4
call fcn.004047e0
mov edx, eax
mov ecx, esi
call fcn.00401be0
mov edx, 0x4579d0
mov ecx, edi
call fcn.00404110
test eax, eax
je 0x40cdf4
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 - 0x68], 0
jne 0x40cd79
push dword [ebp - 0x64]
call fcn.0043575c
add esp, 4
cmp byte [ebp - 0x80], 0
jne 0x40cd88
push edi
call fcn.0043575c
add esp, 4
cmp byte [ebp - 0x20], 0
jne 0x40cd99
push dword [ebp - 0x1c]
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 - 0x28]
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_imagemagick_external__:_Specified_filename_is__null_.
push eax
call fcn.00401450
add esp, 0x24
lea eax, [ebp - 0x28]
push 0x475714
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
mov edx, 0x457fc0
mov ecx, ebx
call fcn.00401f50
mov ecx, eax
call fcn.004020a0
push ebx
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 - 0x40]
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_imagemagick_external__:_Failed_to_load_file__s_with_external_command_convert.
push eax
call fcn.00401780
add esp, 0x28
lea eax, [ebp - 0x40]
push 0x47569c
push eax
call sub.VCRUNTIME140.dll__CxxThrowException
int3