Function at 0x40f999
Capabilities:
Delete file
Get file size

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
push esi
mov dword [ebp - 0x18], ecx
mov esi, 0x47e2f0
push edi
push 0x80
mov ecx, esi
call fcn.0041c8fd
test eax, eax
je 0x40fc40
mov ecx, dword [0x47e844]
mov edx, dword [0x47e848]
mov eax, ecx
mov edi, 0x84
shr eax, 0x1f
and al, 1
xor ebx, ebx
mov byte [ebp - 2], al
mov eax, edx
shr eax, 0x1f
and al, 1
push edi
mov byte [ebp - 3], al
mov eax, 0x7fffffff
and ecx, eax
and edx, eax
mov dword [ebp - 0x10], ecx
mov ecx, esi
mov dword [ebp - 0xc], edx
mov byte [ebp - 1], bl
call fcn.0041c8fd
cmp eax, 1
je 0x40fa7d
push 0x88
mov ecx, esi
call fcn.0041c8fd
push eax
mov ecx, 0x47f208
call fcn.0040fca0
cmp eax, 2
je 0x40fa7d
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
mov ecx, 0x47e6c8
call fcn.0041cd1e
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x40fa50
push 0xfffffffffffffff9
jmp 0x40fc3f
lea eax, [ebp - 8]
push ebx
push eax
push edi
mov ecx, esi
mov dword [ebp - 8], ebx
call fcn.0041c8fd
push eax
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0x88
mov ecx, esi
call fcn.0041c8fd
mov esi, 0x47df9c
jmp 0x40fac9
push ebx
push 0x80
push 3
push ebx
mov esi, 0x47df9c
push 1
push 0x80000000
mov ecx, esi
call fcn.0041cd1e
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
cmp eax, 0xffffffff
mov dword [ebp - 0x14], eax
jne 0x40fabd
mov ecx, esi
call fcn.0041cd1e
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
push 0xfffffffffffffffa
jmp 0x40fc3f
push ebx
push eax
mov byte [ebp - 1], 1
call dword [sym.imp.KERNEL32.dll_GetFileSize]
lea ecx, [ebp - 0x24]
mov dword [ebp - 0x24], ebx
push ecx
lea ecx, [ebp - 0x1c]
push ecx
lea ecx, [ebp - 0x20]
push ecx
lea ecx, [ebp - 0x28]
push ecx
lea ecx, [ebp - 0x3c]
push ecx
mov ecx, dword [ebp - 0x18]
push eax
push dword [ebp - 0x14]
call fcn.00410087
push dword [ebp - 0x14]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp byte [ebp - 1], bl
je 0x40fb0a
mov ecx, esi
call fcn.0041cd1e
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileA]
cmp edi, ebx
jge 0x40fb15
mov eax, edi
jmp 0x40fc40
mov eax, dword [ebp - 0x28]
cmp byte [ebp - 2], bl
mov edi, dword [0x47e170]
mov ecx, dword [eax + 4]
mov edx, dword [eax + 8]
mov dword [ebp - 8], ecx
mov dword [ebp - 0x2c], edx
mov dword [ebp - 0x14], edx
je 0x40fb3c
mov edx, edi
sub edx, ecx
sub edx, dword [ebp - 0x10]
mov dword [ebp - 0x10], edx
cmp byte [ebp - 3], bl
mov esi, dword [0x47e174]
je 0x40fb52
mov edx, esi
sub edx, dword [ebp - 0x14]
sub edx, dword [ebp - 0xc]
mov dword [ebp - 0xc], edx
mov dl, byte [0x47e84c]
test dl, 4
je 0x40fb6b
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 8], edi
mov dword [ebp - 0x14], esi
jmp 0x40fb76
test dl, 8
je 0x40fb76
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0xc], ebx
test dl, 0x40
mov edi, 0xcc0020
je 0x40fba5
lea ecx, [ebp - 0x20]
push ecx
mov ecx, dword [ebp - 0x18]
push dword [ebp - 0x1c]
push eax
push dword [ebp - 0x14]
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
call fcn.0040f6cb
cmp eax, ebx
jge 0x40fbdd
jmp 0x40fc40
push edi
push ebx
push eax
push dword [ebp - 0x1c]
push dword [ebp - 0x2c]
push ecx
push ebx
push ebx
push dword [ebp - 0x14]
push dword [ebp - 8]
push dword [ebp - 0xc]
push dword [ebp - 0x10]
push dword [0x47e184]
call dword [sym.imp.GDI32.dll_StretchDIBits]
push dword [ebp - 0x20]
mov esi, eax
call fcn.00424dce
cmp esi, 0xffffffff
pop ecx
jne 0x40fbdd
push 0xfffffffffffffff4
jmp 0x40fc3f
push dword [ebp - 0x24]
call dword [sym.imp.GDI32.dll_DeleteObject]
test byte [0x47e84c], 8
je 0x40fc3d
xor esi, esi
cmp dword [0x47e174], ebx
mov dword [ebp - 0x10], esi
jle 0x40fc3d
neg esi
sbb esi, esi
not esi
and esi, dword [ebp - 8]
cmp esi, dword [0x47e170]
jge 0x40fc2c
mov eax, dword [0x47e184]
push edi
push ebx
push ebx
push eax
push dword [ebp - 0x14]
push dword [ebp - 8]
push dword [ebp - 0x10]
push esi
push eax
call dword [sym.imp.GDI32.dll_BitBlt]
add esi, dword [ebp - 8]
jmp 0x40fc05
mov esi, dword [ebp - 0x10]
add esi, dword [ebp - 0x14]
cmp esi, dword [0x47e174]
mov dword [ebp - 0x10], esi
jl 0x40fbfc
push 1
pop eax
pop edi
pop esi
pop ebx
leave
ret