Function at 0x10054aa0
Capabilities:
Move file

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x102648e8
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 0x10054d5c
mov edi, dword [esi]
mov ebx, 1
test edi, edi
je 0x10054d3c
cmp dword [edi + 0x1c], 0
mov dword [ebp - 0x14], edi
je 0x10054c81
cmp dword [edi + 0x2c], 0
je 0x10054c81
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.100115a0
mov byte [ebp - 4], 2
lea ecx, [ebp - 0x48]
push dword [edi + 0x2c]
call fcn.100115a0
lea eax, [ebp - 0x60]
mov byte [ebp - 4], 3
push eax
lea edx, [ebp - 0x48]
lea ecx, [ebp - 0x30]
call fcn.10053ed0
add esp, 4
lea ecx, [ebp - 0x48]
call fcn.10011530
lea ecx, [ebp - 0x60]
call fcn.10011530
cmp dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x30]
push 0x103cf314
cmovae eax, dword [ebp - 0x30]
push eax
call fcn.10201923
add esp, 8
mov dword [ebp - 0x14], eax
test eax, eax
jne 0x10054b9d
cmp dword [ebp - 0x1c], 0x10
lea esi, [ebp - 0x30]
cmovae esi, dword [ebp - 0x30]
call fcn.10208112
push dword [eax]
call fcn.102081c5
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 0x10054be9
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.102019f7
add esp, 4
test eax, eax
je 0x10054be9
xor ebx, ebx
lea esi, [ebp - 0x30]
cmp dword [ebp - 0x1c], 0x10
cmovae esi, dword [ebp - 0x30]
call fcn.10208112
push dword [eax]
call fcn.102081c5
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 0x10054bf9
push eax
call fcn.102019f7
add esp, 4
test ebx, ebx
je 0x10054c50
push dword [edi + 0x2c]
call fcn.10207f4a
cmp dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x30]
push dword [edi + 0x2c]
cmovae eax, dword [ebp - 0x30]
push eax
call fcn.10207fd3
add esp, 0xc
mov ebx, eax
neg ebx
sbb ebx, ebx
add ebx, 1
jne 0x10054c64
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.10011530
jmp 0x10054c81
cmp dword [ebp - 0x1c], 0x10
lea eax, [ebp - 0x30]
cmovae eax, dword [ebp - 0x30]
push eax
call fcn.10207f4a
add esp, 4
lea ecx, [ebp - 0x30]
call fcn.10011530
jmp 0x10054c81
mov eax, dword [edi + 0x24]
mov esi, dword [eax]
cmp esi, eax
je 0x10054ca4
nop word [eax + eax]
mov ecx, dword [esi + 8]
test ecx, ecx
je 0x10054c9d
mov eax, dword [ecx]
push 1
call dword [eax]
mov esi, dword [esi]
cmp esi, dword [edi + 0x24]
jne 0x10054c90
mov ecx, dword [edi + 0x10]
test ecx, ecx
je 0x10054cc9
call fcn.10052b20
mov esi, dword [edi + 0x10]
test esi, esi
je 0x10054cc9
mov ecx, esi
call fcn.100529d0
push 0x48
push esi
call fcn.101f5987
add esp, 8
cmp dword [edi + 0x18], 0
je 0x10054d0a
nop
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.10055c40
push dword [ebp - 0x14]
lea eax, [ebp + 0xc]
push dword [ebp - 0x18]
lea ecx, [edi + 0x14]
push eax
call fcn.10055670
cmp dword [edi + 0x18], 0
jne 0x10054cd0
push 0x10
push dword [edi + 8]
call fcn.101f5987
mov eax, dword [edi + 0x2c]
add esp, 8
test eax, eax
je 0x10054d27
push eax
call fcn.101f5a18
add esp, 4
mov ecx, edi
call fcn.10054d80
push 0x48
push edi
call fcn.101f5987
mov esi, dword [ebp + 8]
add esp, 8
push 4
push esi
call fcn.101f5987
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