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

Disassembly:
sub esp, 0x24
push ebx
mov ebx, dword [esp + 0x3c]
push ebp
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileSize]
push esi
mov esi, ecx
mov dword [ebx], 0
push edi
mov eax, dword [esi + 0x90]
mov edi, dword [esp + 0x40]
test eax, eax
mov dword [esp + 0x10], 0
je 0x4d4ed3
mov eax, dword [esi + 0x9c]
test eax, eax
je 0x4d4daa
mov eax, dword [esi + 0x98]
push 0
push eax
call ebp
cmp eax, edi
ja 0x4d4ed3
mov eax, dword [esi + 0x9c]
test eax, eax
jne 0x4d4dae
xor edi, edi
jmp 0x4d4dbb
mov ecx, dword [esi + 0x98]
push 0
push ecx
call ebp
mov edi, eax
push edi
call sub.MFC42.DLL_operatornew
mov ebx, eax
mov eax, dword [esi + 0x9c]
xor ebp, ebp
add esp, 4
cmp eax, ebp
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], ebp
mov dword [esp + 0x44], ebp
je 0x4d4eaf
mov edx, dword [esi + 0x98]
push ebp
push ebp
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
jne 0x4d4eaf
mov ecx, dword [esi + 0x98]
lea eax, [esp + 0x44]
push ebp
push eax
push edi
push ebx
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebp
je 0x4d4eaf
cmp dword [esp + 0x44], edi
jne 0x4d4eaf
mov eax, dword [esp + 0x3c]
cmp eax, ebp
je 0x4d4eab
lea edx, [esp + 0x24]
test edx, edx
je 0x4d4eab
cmp ebx, ebp
je 0x4d4eab
push ebp
push 0x80
push 2
push ebp
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
xor eax, eax
cmp esi, 0xffffffff
je 0x4d4ea7
mov ebp, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x3c], eax
push eax
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x2c]
push 0x10
push ecx
push esi
call ebp
lea edx, [esp + 0x3c]
push 0
push edx
push edi
push ebx
push esi
call ebp
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov esi, eax
jmp 0x4d4eb3
xor esi, esi
jmp 0x4d4eb3
mov esi, dword [esp + 0x10]
push ebx
call sub.MFC42.DLL_operatordelete
add esp, 4
test esi, esi
je 0x4d535b
mov eax, dword [esp + 0x48]
mov dword [eax], 6
jmp 0x4d51f8
mov ecx, dword [esi + 0x90]
test ecx, ecx
je 0x4d536f
mov eax, dword [esi + 0x84]
test eax, eax
je 0x4d536b
mov ebx, dword [esi + 0x88]
test ebx, ebx
je 0x4d5367
mov edx, dword [eax]
cmp edx, edi
jae 0x4d5367
mov ecx, dword [eax + 8]
mov ebx, dword [ebx + 8]
cmp ebx, ecx
sbb eax, eax
neg eax
mov dword [esp + 0x40], eax
je 0x4d5219
mov eax, dword [esi + 0x9c]
test eax, eax
jne 0x4d4f2b
xor eax, eax
jmp 0x4d4f36
mov ecx, dword [esi + 0x98]
push 0
push ecx
call ebp
mov edx, dword [esi + 0x84]
sub eax, dword [edx + 8]
cmp edi, eax
mov dword [esp + 0x14], eax
jbe 0x4d4f4b
sub edi, eax
jmp 0x4d4f4d
xor edi, edi
test eax, eax
jbe 0x4d5351
test edi, edi
jbe 0x4d5351
mov eax, dword [esi + 0x88]
mov ecx, edi
mov edx, dword [eax + 8]
mov eax, dword [esp + 0x44]
sub ecx, edx
cmp ecx, eax
jbe 0x4d5351
push edi
call sub.MFC42.DLL_operatornew
mov edx, dword [esp + 0x18]
mov dword [esp + 0x48], eax
push edx
call sub.MFC42.DLL_operatornew
mov dword [esp + 0x24], eax
mov eax, dword [esi + 0x88]
xor ecx, ecx
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], ecx
mov dword [esp + 0x38], ecx
mov ebp, dword [eax + 8]
mov eax, dword [eax]
mov dword [esp + 0x28], ebp
add ebp, eax
add esp, 8
cmp edi, ebp
mov dword [esp + 0x18], ebp
jbe 0x4d507a
mov edx, dword [esi + 0x8c]
mov dword [esp + 0x40], 0xffffffff
cmp edx, ecx
jle 0x4d5028
lea ebx, [esi + 4]
mov eax, dword [ebx]
test eax, eax
je 0x4d5011
mov ebp, dword [esi + 0x84]
mov eax, dword [eax + 8]
cmp eax, dword [ebp + 8]
jae 0x4d5024
cmp eax, edi
jae 0x4d5024
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 0x4d4ff5
jmp 0x4d5028
mov ebp, dword [esp + 0x18]
mov eax, dword [esi + 0x90]
test eax, eax
je 0x4d5040
mov eax, dword [esp + 0x40]
cmp eax, edx
jae 0x4d5040
mov ecx, dword [esi + eax*4 + 4]
jmp 0x4d5042
xor ecx, ecx
mov edx, dword [esi + 0x84]
mov edx, dword [edx + 8]
cmp edi, edx
ja 0x4d506e
test ecx, ecx
je 0x4d506e
mov eax, dword [ecx + 8]
mov ebx, dword [esp + 0x20]
cmp eax, ebx
jbe 0x4d506e
cmp eax, edx
jae 0x4d506e
mov edx, dword [ecx]
sub eax, edi
add eax, edx
mov dword [esp + 0x30], eax
jmp 0x4d5080
mov edi, ebp
mov dword [esp + 0x30], 0
jmp 0x4d5080
sub ebp, edi
mov dword [esp + 0x30], ebp
mov eax, dword [esi + 0x9c]
mov dword [esp + 0x2c], edi
test eax, eax
mov dword [esp + 0x40], 0
je 0x4d51dd
mov eax, dword [esi + 0x98]
mov ebp, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push 0
push 0
push eax
call ebp
test eax, eax
jne 0x4d51dd
mov edx, dword [esp + 0x44]
lea ecx, [esp + 0x40]
push eax
mov eax, dword [esi + 0x98]
push ecx
push edi
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4d51dd
cmp dword [esp + 0x40], edi
jne 0x4d51dd
mov ecx, dword [esi + 0x84]
mov eax, dword [esi + 0x9c]
test eax, eax
mov ebx, dword [ecx + 8]
mov dword [esp + 0x40], 0
je 0x4d51dd
mov edx, dword [esi + 0x98]
push 0
push 0
push ebx
push edx
call ebp
cmp eax, ebx
jne 0x4d51dd
mov ebx, dword [esp + 0x14]
mov ebp, dword [esp + 0x1c]
mov ecx, dword [esi + 0x98]
lea eax, [esp + 0x40]
push 0
push eax
push ebx
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4d51dd
cmp dword [esp + 0x40], ebx
jne 0x4d51dd
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x4d51d5
lea edx, [esp + 0x24]
test edx, edx
je 0x4d51d5
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x4d51d5
push 0
push 0x80
push 2
push 0
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
xor eax, eax
cmp esi, 0xffffffff
je 0x4d51cf
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
mov dword [esp + 0x3c], eax
push eax
lea eax, [esp + 0x40]
push eax
lea ecx, [esp + 0x2c]
push 0x10
push ecx
push esi
call ebx
mov eax, dword [esp + 0x44]
lea edx, [esp + 0x3c]
push 0
push edx
push edi
push eax
push esi
call ebx
test ebp, ebp
je 0x4d51c3
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x3c]
push 0
push ecx
push edx
push ebp
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
mov dword [esp + 0x10], eax
jmp 0x4d51dd
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x44]
push eax
call sub.MFC42.DLL_operatordelete
mov ecx, dword [esp + 0x20]
push ecx
call sub.MFC42.DLL_operatordelete
add esp, 8
mov esi, dword [esp + 0x10]
test esi, esi
je 0x4d535b
mov eax, dword [esp + 0x48]
pop edi
pop esi
pop ebp
mov dword [eax], 1
mov eax, 1
pop ebx
add esp, 0x24
ret 0x14
add ecx, edx
mov eax, edi
sub eax, ecx
je 0x4d5351
test ecx, ecx
jbe 0x4d5351
sub eax, ebx
add eax, ecx
mov ecx, dword [esp + 0x44]
cmp eax, ecx
jbe 0x4d5351
push edi
call sub.MFC42.DLL_operatornew
mov ebp, eax
mov eax, dword [esi + 0x9c]
xor ebx, ebx
add esp, 4
cmp eax, ebx
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 0x4d5343
mov eax, dword [esi + 0x98]
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
jne 0x4d5343
mov edx, dword [esi + 0x98]
lea ecx, [esp + 0x44]
push ebx
push ecx
push edi
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_ReadFile]
cmp eax, ebx
je 0x4d5343
cmp dword [esp + 0x44], edi
jne 0x4d5343
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x4d533f
lea ecx, [esp + 0x24]
test ecx, ecx
je 0x4d533f
cmp ebp, ebx
je 0x4d533f
push ebx
push 0x80
push 2
push ebx
push 1
push 0xc0000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
xor eax, eax
cmp esi, 0xffffffff
je 0x4d532d
mov ebx, dword [sym.imp.KERNEL32.dll_WriteFile]
lea edx, [esp + 0x3c]
mov dword [esp + 0x3c], eax
push eax
push edx
lea eax, [esp + 0x2c]
push 0x10
push eax
push esi
call ebx
lea ecx, [esp + 0x3c]
push 0
push ecx
push edi
push ebp
push esi
call ebx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, 1
push ebp
mov dword [esp + 0x14], eax
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x4d51f4
mov dword [esp + 0x10], ebx
push ebp
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x4d51f4
mov edx, dword [esp + 0x48]
mov dword [edx], 3
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0x14
mov ebx, dword [esp + 0x48]
test ecx, ecx
jne 0x4d53c2
mov eax, dword [esi + 0x88]
mov ecx, dword [esi + 0x84]
test eax, eax
jne 0x4d5395
test ecx, ecx
jne 0x4d53ab
pop edi
pop esi
mov dword [ebx], 2
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0x14
test ecx, ecx
jne 0x4d53ab
pop edi
pop esi
mov dword [ebx], 4
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0x14
neg eax
sbb eax, eax
pop edi
and al, 0xfd
pop esi
add eax, 5
pop ebp
mov dword [ebx], eax
xor eax, eax
pop ebx
add esp, 0x24
ret 0x14
mov esi, dword [esi + 0x84]
test esi, esi
je 0x4d535b
cmp dword [esi], edi
jb 0x4d535b
pop edi
pop esi
mov dword [ebx], 3
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0x14