Function at 0x403112
Capabilities:
Get file size
Read file on windows
Set file attributes
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0xc
push ebx
push esi
push edi
xor edi, edi
push edi
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_SetFileAttributesA]
test eax, eax
je 0x4033ea
push edi
push 0x80
push 3
push edi
push edi
push 0xc0000000
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
je 0x4033ea
lea eax, [ebp - 8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x40317a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
jmp 0x4033e4
sub eax, 8
mov esi, 0x4182fc
push eax
mov dword [ebp - 4], eax
push dword [ebp - 8]
push ebx
push dword [ebp + 8]
push str.RewriteDiskBlobInFile._1.__s.__08X.__08X.__08X.
push esi
push 3
call fcn.00407279
add esp, 0x1c
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp - 8], edi
jne 0x4031b6
cmp dword [ebp - 4], 0x7fffffff
jae 0x4031b6
xor eax, eax
jmp 0x4031b9
lea eax, [ebp - 8]
push edi
push eax
push dword [ebp - 4]
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
je 0x4033a2
lea eax, [ebp - 4]
push edi
push eax
lea eax, [ebp - 0xc]
push 4
push eax
push ebx
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4033a2
cmp dword [ebp - 4], 4
jne 0x4033a2
push 4
lea eax, [ebp - 0xc]
push str.DPDL
push eax
call fcn.0040b9e0
add esp, 0xc
test eax, eax
jne 0x4033a2
lea eax, [ebp - 4]
push edi
push eax
lea eax, [ebp - 0xc]
push 4
push eax
push ebx
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x403379
cmp dword [ebp - 4], 4
jne 0x403379
mov eax, dword [ebp + 0xc]
push dword [eax]
push dword [ebp - 0xc]
push str.RewriteDiskBlobInFile._4.__08X.__08X.
push esi
push 3
call fcn.00407279
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 0xc]
add esp, 0x14
cmp eax, dword [ecx]
jbe 0x40326a
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0xea
jmp 0x4033e4
lea eax, [ebp - 8]
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
cmp eax, 0xffffffff
mov dword [ebp - 4], eax
jne 0x40329e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
mov edi, eax
push edi
push str.RewriteDiskBlobInFile._3.__08X.__08X.
push esi
push 1
call fcn.00407279
add esp, 0x14
jmp 0x403398
push 0xfffffffffffffff8
pop ecx
sub ecx, dword [ebp - 0xc]
add eax, ecx
cmp dword [ebp - 8], edi
mov dword [ebp - 4], eax
jne 0x4032b9
cmp eax, 0x7fffffff
jae 0x4032b9
xor ecx, ecx
jmp 0x4032bc
lea ecx, [ebp - 8]
push edi
push ecx
push eax
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x4032de
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 8]
mov edi, eax
push dword [ebp - 4]
jmp 0x403387
lea eax, [ebp - 4]
push edi
push eax
mov eax, dword [ebp + 0xc]
mov dword [ebp - 4], edi
push dword [eax]
push dword [eax + 4]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403350
mov ecx, dword [ebp + 0xc]
mov eax, dword [ebp - 4]
cmp eax, dword [ecx]
jne 0x403350
lea eax, [ebp - 4]
push edi
push eax
push 4
push str.DPDL
push ebx
mov dword [ebp - 4], edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403350
cmp dword [ebp - 4], 4
jne 0x403350
lea eax, [ebp - 4]
push edi
push eax
push 4
push dword [ebp + 0xc]
mov dword [ebp - 4], edi
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x403350
cmp dword [ebp - 4], 4
jne 0x403350
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 1
pop eax
jmp 0x4033ec
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 8]
mov edi, eax
mov eax, dword [ebp + 0xc]
push dword [ebp - 4]
push dword [eax]
push dword [eax + 4]
push edi
push str.RewriteDiskBlobInFile._3.__08X.__08X.__08X.__08X.__08X.
push esi
push 1
call fcn.00407279
add esp, 0x20
jmp 0x403398
call dword [sym.imp.KERNEL32.dll_GetLastError]
push dword [ebp - 4]
mov edi, eax
push dword [ebp - 0xc]
push edi
push str.RewriteDiskBlobInFile._3.__08X.__08X.__08X.
push esi
push 1
call fcn.00407279
add esp, 0x18
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
jmp 0x4033e4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov dword [ebp + 0xc], eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xc]
push dword [ebp - 4]
push dword [ebp - 8]
push ebx
push dword [ebp + 0xc]
push str.RewriteDiskBlobInFile._2.__08X.__08X.__08X.__08X.__08X.
push esi
push 1
call fcn.00407279
add esp, 0x20
cmp dword [ebp + 0xc], edi
jne 0x4033e1
cmp dword [ebp - 4], 4
jne 0x4033e1
mov dword [ebp + 0xc], 0x3ee
push dword [ebp + 0xc]
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
pop edi
pop esi
pop ebx
leave
ret