Function at 0x552980
Capabilities:
Get file size
Read file on windows
Write file on windows

Disassembly:
sub esp, 0x24
push ebx
push ebp
push esi
mov esi, ecx
xor ebp, ebp
push edi
mov eax, dword [esi + 0x90]
mov dword [esp + 0x10], ebp
cmp eax, ebp
je 0x552f56
mov eax, dword [esi + 0x98]
mov ebx, dword [sym.imp.KERNEL32.DLL_GetFileSize]
cmp eax, 0xffffffff
je 0x5529be
push ebp
push eax
call ebx
mov edi, dword [esp + 0x40]
cmp eax, edi
ja 0x552afc
mov eax, dword [esi + 0x98]
cmp eax, 0xffffffff
jne 0x5529cd
xor ebx, ebx
jmp 0x5529d3
push ebp
push eax
call ebx
mov ebx, eax
push ebx
call sub.MFC42.DLL_operatornew
mov ebp, eax
mov eax, dword [esi + 0x98]
add esp, 4
xor edi, edi
cmp eax, 0xffffffff
mov byte [esp + 0x24], 0x4d
mov byte [esp + 0x25], 0x4f
mov byte [esp + 0x26], 0x56
mov byte [esp + 0x27], 0x20
mov byte [esp + 0x28], 0x46
mov byte [esp + 0x29], 0x52
mov byte [esp + 0x2a], 0x41
mov byte [esp + 0x2b], 0x47
mov dword [esp + 0x2c], ebx
mov dword [esp + 0x30], edi
mov dword [esp + 0x44], edi
je 0x552acc
push edi
push edi
push edi
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
test eax, eax
jne 0x552acc
mov ecx, dword [esi + 0x98]
lea eax, [esp + 0x44]
push edi
push eax
push ebx
push ebp
push ecx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
cmp eax, edi
je 0x552acc
cmp dword [esp + 0x44], ebx
jne 0x552acc
mov eax, dword [esp + 0x3c]
cmp eax, edi
je 0x552af6
lea edx, [esp + 0x24]
test edx, edx
je 0x552af6
cmp ebp, edi
je 0x552af6
push edi
push 0x80
push 2
push edi
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov edi, eax
xor eax, eax
cmp edi, 0xffffffff
je 0x552ac8
mov dword [esp + 0x3c], eax
push eax
lea eax, [esp + 0x40]
lea ecx, [esp + 0x28]
push eax
push 0x10
push ecx
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
lea edx, [esp + 0x3c]
push 0
push edx
push ebx
push ebp
push edi
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push edi
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, 1
mov dword [esp + 0x10], eax
push ebp
call sub.MFC42.DLL_operatordelete
add esp, 4
mov eax, dword [esp + 0x10]
test eax, eax
je 0x552f4e
mov eax, 1
pop edi
mov dword [esi + 0xa4], eax
pop esi
pop ebp
pop ebx
add esp, 0x24
ret 0x10
mov dword [esp + 0x10], edi
jmp 0x552acc
mov ecx, dword [esi + 0x84]
mov edx, dword [ecx]
cmp edx, edi
jb 0x552b1e
mov dword [esi + 0xa4], 3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0x10
cmp dword [esi + 0x90], ebp
je 0x552e0c
mov eax, dword [esi + 0x88]
mov ebp, dword [ecx + 8]
cmp dword [eax + 8], ebp
sbb eax, eax
xor ebp, ebp
neg eax
cmp eax, ebp
je 0x552e0c
mov eax, dword [esi + 0x98]
cmp eax, 0xffffffff
jne 0x552b53
xor eax, eax
jmp 0x552b57
push ebp
push eax
call ebx
mov ecx, dword [esi + 0x84]
sub eax, dword [ecx + 8]
mov ebx, eax
cmp edi, ebx
mov dword [esp + 0x1c], ebx
jbe 0x552b6e
sub edi, ebx
jmp 0x552b70
xor edi, edi
cmp ebx, ebp
jbe 0x552f32
cmp edi, ebp
jbe 0x552f32
mov edx, dword [esi + 0x88]
mov eax, edi
mov ecx, dword [edx + 8]
sub eax, ecx
mov ecx, dword [esp + 0x44]
cmp eax, ecx
jbe 0x552f32
push edi
call sub.MFC42.DLL_operatornew
push ebx
mov dword [esp + 0x4c], eax
call sub.MFC42.DLL_operatornew
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x88]
mov byte [esp + 0x2c], 0x4d
mov byte [esp + 0x2d], 0x4f
mov byte [esp + 0x2e], 0x56
mov byte [esp + 0x2f], 0x20
mov byte [esp + 0x30], 0x46
mov byte [esp + 0x31], 0x52
mov byte [esp + 0x32], 0x41
mov byte [esp + 0x33], 0x47
mov dword [esp + 0x34], ebp
mov dword [esp + 0x38], ebp
mov ebp, dword [eax + 8]
mov ecx, dword [eax]
mov dword [esp + 0x28], ebp
add ebp, ecx
add esp, 8
cmp edi, ebp
mov dword [esp + 0x18], ebp
jbe 0x552c99
mov edx, dword [esi + 0x8c]
xor ecx, ecx
test edx, edx
mov dword [esp + 0x40], 0xffffffff
jle 0x552c47
lea ebx, [esi + 4]
mov eax, dword [ebx]
test eax, eax
je 0x552c30
mov ebp, dword [esi + 0x84]
mov eax, dword [eax + 8]
cmp eax, dword [ebp + 8]
jae 0x552c43
cmp eax, edi
jae 0x552c43
mov ebp, dword [esp + 0x18]
mov eax, dword [esp + 0x40]
add ebx, 4
inc eax
inc ecx
cmp ecx, edx
mov dword [esp + 0x40], eax
jl 0x552c14
jmp 0x552c47
mov ebp, dword [esp + 0x18]
mov eax, dword [esi + 0x90]
test eax, eax
je 0x552c5f
mov eax, dword [esp + 0x40]
cmp eax, edx
jae 0x552c5f
mov ecx, dword [esi + eax*4 + 4]
jmp 0x552c61
xor ecx, ecx
mov edx, dword [esi + 0x84]
mov edx, dword [edx + 8]
cmp edi, edx
ja 0x552c8d
test ecx, ecx
je 0x552c8d
mov eax, dword [ecx + 8]
mov ebx, dword [esp + 0x20]
cmp eax, ebx
jbe 0x552c8d
cmp eax, edx
jae 0x552c8d
mov edx, dword [ecx]
sub eax, edi
add eax, edx
mov dword [esp + 0x30], eax
jmp 0x552c9f
mov edi, ebp
mov dword [esp + 0x30], 0
jmp 0x552c9f
sub ebp, edi
mov dword [esp + 0x30], ebp
mov eax, dword [esi + 0x98]
mov dword [esp + 0x2c], edi
cmp eax, 0xffffffff
mov dword [esp + 0x40], 0
je 0x552df0
push 0
push 0
push 0
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
test eax, eax
jne 0x552df0
mov ecx, dword [esp + 0x44]
mov edx, dword [esi + 0x98]
mov ebp, dword [sym.imp.KERNEL32.DLL_ReadFile]
push eax
lea eax, [esp + 0x44]
push eax
push edi
push ecx
push edx
call ebp
test eax, eax
je 0x552df0
cmp dword [esp + 0x40], edi
jne 0x552df0
mov eax, dword [esi + 0x84]
mov dword [esp + 0x40], 0
mov ebx, dword [eax + 8]
mov eax, dword [esi + 0x98]
cmp eax, 0xffffffff
je 0x552df0
push 0
push 0
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
cmp eax, ebx
jne 0x552df0
mov ebx, dword [esp + 0x1c]
mov edx, dword [esp + 0x14]
mov eax, dword [esi + 0x98]
lea ecx, [esp + 0x40]
push 0
push ecx
push ebx
push edx
push eax
call ebp
test eax, eax
je 0x552df0
cmp dword [esp + 0x40], ebx
jne 0x552df0
mov eax, dword [esp + 0x3c]
xor ebp, ebp
cmp eax, ebp
je 0x552dec
lea ecx, [esp + 0x24]
test ecx, ecx
je 0x552dec
cmp dword [esp + 0x44], ebp
je 0x552dec
push ebp
push 0x80
push 2
push ebp
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov ebx, eax
xor eax, eax
cmp ebx, 0xffffffff
je 0x552de6
lea edx, [esp + 0x3c]
push ebp
push edx
lea eax, [esp + 0x2c]
push 0x10
mov dword [esp + 0x48], ebp
mov ebp, dword [sym.imp.KERNEL32.DLL_WriteFile]
push eax
push ebx
call ebp
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x3c]
push 0
push ecx
push edi
push edx
push ebx
call ebp
mov eax, dword [esp + 0x14]
test eax, eax
je 0x552dda
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x3c]
push 0
push ecx
push edx
push eax
push ebx
call ebp
push ebx
call dword [sym.imp.KERNEL32.DLL_CloseHandle]
mov eax, 1
mov dword [esp + 0x10], eax
jmp 0x552df0
mov dword [esp + 0x10], ebp
mov eax, dword [esp + 0x44]
push eax
call sub.MFC42.DLL_operatordelete
mov ecx, dword [esp + 0x18]
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 8
jmp 0x552ad5
mov ecx, dword [ecx + 8]
mov eax, edi
add ecx, edx
sub eax, ecx
je 0x552f32
cmp ecx, ebp
jbe 0x552f32
mov edx, dword [esi + 0x88]
sub eax, dword [edx + 8]
add eax, ecx
mov ecx, dword [esp + 0x44]
cmp eax, ecx
jbe 0x552f32
push edi
call sub.MFC42.DLL_operatornew
mov ebp, eax
mov eax, dword [esi + 0x98]
add esp, 4
xor ebx, ebx
cmp eax, 0xffffffff
mov byte [esp + 0x24], 0x4d
mov byte [esp + 0x25], 0x4f
mov byte [esp + 0x26], 0x56
mov byte [esp + 0x27], 0x20
mov byte [esp + 0x28], 0x46
mov byte [esp + 0x29], 0x52
mov byte [esp + 0x2a], 0x41
mov byte [esp + 0x2b], 0x47
mov dword [esp + 0x2c], edi
mov dword [esp + 0x30], ebx
mov dword [esp + 0x44], ebx
je 0x552acc
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.DLL_SetFilePointer]
test eax, eax
jne 0x552acc
mov ecx, dword [esi + 0x98]
lea eax, [esp + 0x44]
push ebx
push eax
push edi
push ebp
push ecx
call dword [sym.imp.KERNEL32.DLL_ReadFile]
cmp eax, ebx
je 0x552acc
cmp dword [esp + 0x44], edi
jne 0x552acc
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x552f29
lea edx, [esp + 0x24]
test edx, edx
je 0x552f29
cmp ebp, ebx
je 0x552f29
push ebx
push 0x80
push 2
push ebx
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.DLL_CreateFileA]
mov ebx, eax
xor eax, eax
cmp ebx, 0xffffffff
je 0x552ac8
mov dword [esp + 0x3c], eax
push eax
lea eax, [esp + 0x40]
lea ecx, [esp + 0x28]
push eax
push 0x10
push ecx
push ebx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
lea edx, [esp + 0x3c]
push 0
push edx
push edi
push ebp
push ebx
call dword [sym.imp.KERNEL32.DLL_WriteFile]
push ebx
jmp 0x552abd
mov dword [esp + 0x10], ebx
jmp 0x552acc
mov dword [esi + 0xa4], 3
mov dword [esi + 0xa4], ebp
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0x10
xor ebp, ebp
mov dword [esi + 0xa4], ebp
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0x10