Function at 0x10047b60
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1024a848
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x54
push ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 0x10], esp
test esi, esi
je 0x10047e2d
mov edi, dword [esi]
mov ebx, 1
test edi, edi
je 0x10047e0d
cmp dword [edi + 0x1c], 0
mov dword [ebp - 0x14], edi
je 0x10047d43
cmp dword [edi + 0x2c], 0
je 0x10047d43
mov dword [ebp - 4], 0
mov dword [ebp - 0x1c], 0xf
mov dword [ebp - 0x20], 0
mov byte [ebp - 0x30], 0
push str.fispool
lea ecx, [ebp - 0x60]
mov byte [ebp - 4], bl
call fcn.100041b0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x48]
push dword [edi + 0x2c]
call fcn.100041b0
lea eax, [ebp - 0x60]
mov byte [ebp - 4], 3
push eax
lea edx, [ebp - 0x48]
lea ecx, [ebp - 0x30]
call fcn.100470b0
add esp, 4
lea ecx, [ebp - 0x48]
call fcn.10004140
lea ecx, [ebp - 0x60]
call fcn.10004140
cmp dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x30]
push 0x10393034
cmovae eax, dword [ebp - 0x30]
push eax
call fcn.101e86c6
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x10047c5d
cmp dword [ebp - 0x1c], 0x10
lea esi, [ebp - 0x30]
cmovae esi, dword [ebp - 0x30]
call fcn.101ef472
push dword [eax]
call fcn.101ef525
push eax
push esi
push str.Failed_to_open__s___s
push dword [edi + 4]
call sym.FreeImage.dll_FreeImage_OutputMessageProc
add esp, 0x14
xor ebx, ebx
jmp 0x10047ca9
push dword [ebp + 0xc]
push eax
push dword [edi + 8]
push esi
push dword [edi + 4]
call sym.FreeImage.dll__FreeImage_SaveMultiBitmapToHandle_20
push dword [ebp - 0x14]
mov ebx, eax
call fcn.101e879a
add esp, 4
test eax, eax
je 0x10047ca9
xor ebx, ebx
lea esi, [ebp - 0x30]
cmp dword [ebp - 0x1c], 0x10
cmovae esi, dword [ebp - 0x30]
call fcn.101ef472
push dword [eax]
call fcn.101ef525
push eax
push esi
push str.Failed_to_close__s___s
push dword [edi + 4]
call sym.FreeImage.dll_FreeImage_OutputMessageProc
add esp, 0x14
mov eax, dword [edi + 0xc]
test eax, eax
je 0x10047cb9
push eax
call fcn.101e879a
add esp, 4
test ebx, ebx
je 0x10047d10
push dword [edi + 0x2c]
call fcn.101ef2aa
cmp dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x30]
push dword [edi + 0x2c]
cmovae eax, dword [ebp - 0x30]
push eax
call fcn.101ef333
add esp, 0xc
mov ebx, eax
neg ebx
sbb ebx, ebx
add ebx, 1
jne 0x10047d24
cmp dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x30]
push dword [edi + 0x2c]
cmovae eax, dword [ebp - 0x30]
push eax
push str.Failed_to_rename__s_to__s
push dword [edi + 4]
call sym.FreeImage.dll_FreeImage_OutputMessageProc
add esp, 0x10
lea ecx, [ebp - 0x30]
call fcn.10004140
jmp 0x10047d59
cmp dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
push eax
call fcn.101ef2aa
add esp, 4
lea ecx, [ebp - 0x30]
call fcn.10004140
jmp 0x10047d59
mov eax, dword [edi + 0xc]
test eax, eax
je 0x10047d59
cmp dword [edi + 0x2c], 0
je 0x10047d59
push eax
call fcn.101e879a
add esp, 4
mov eax, dword [edi + 0x24]
mov esi, dword [eax]
cmp esi, eax
je 0x10047d76
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x10047d6f
mov eax, dword [ecx]
push 1
call dword [eax]
mov esi, dword [esi]
cmp esi, dword [edi + 0x24]
jne 0x10047d62
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x10047d9b
call fcn.10045d00
mov esi, dword [edi + 0x10]
test esi, esi
je 0x10047d9b
mov ecx, esi
call fcn.10045bb0
push 0x48
push esi
call fcn.101dc67a
add esp, 8
cmp dword [edi + 0x18], 0
je 0x10047ddb
mov eax, dword [edi + 0x14]
mov eax, dword [eax]
push dword [eax + 0x10]
call sym.FreeImage.dll__FreeImage_Unload_4
mov eax, dword [edi + 0x14]
lea ecx, [edi + 0x14]
mov eax, dword [eax]
add eax, 0x10
push eax
lea eax, [ebp - 0x18]
push eax
call fcn.10048f80
push dword [ebp - 0x14]
lea eax, [ebp + 0xc]
push dword [ebp - 0x18]
lea ecx, [edi + 0x14]
push eax
call fcn.100489b0
cmp dword [edi + 0x18], 0
jne 0x10047da1
push 0x10
push dword [edi + 8]
call fcn.101dc67a
mov eax, dword [edi + 0x2c]
add esp, 8
test eax, eax
je 0x10047df8
push eax
call fcn.101dc696
add esp, 4
mov ecx, edi
call fcn.10047e50
push 0x3c
push edi
call fcn.101dc67a
mov esi, dword [ebp + 8]
add esp, 8
push 4
push esi
call fcn.101dc67a
add esp, 8
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 8
mov ecx, dword [ebp - 0xc]
xor eax, eax
pop edi
pop esi
mov dword fs:[0], ecx
pop ebx
mov esp, ebp
pop ebp
ret 8