Function at 0x4d2460
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 0x4d25e3
mov eax, dword [esi + 0x9c]
test eax, eax
je 0x4d24ba
mov eax, dword [esi + 0x98]
push 0
push eax
call ebp
cmp eax, edi
ja 0x4d25e3
mov eax, dword [esi + 0x9c]
test eax, eax
jne 0x4d24be
xor edi, edi
jmp 0x4d24cb
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 0x4d25bf
mov edx, dword [esi + 0x98]
push ebp
push ebp
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
jne 0x4d25bf
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 0x4d25bf
cmp dword [esp + 0x44], edi
jne 0x4d25bf
mov eax, dword [esp + 0x3c]
cmp eax, ebp
je 0x4d25bb
lea edx, [esp + 0x24]
test edx, edx
je 0x4d25bb
cmp ebx, ebp
je 0x4d25bb
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 0x4d25b7
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 0x4d25c3
xor esi, esi
jmp 0x4d25c3
mov esi, dword [esp + 0x10]
push ebx
call sub.MFC42.DLL_operatordelete
add esp, 4
test esi, esi
je 0x4d2a6b
mov eax, dword [esp + 0x48]
mov dword [eax], 6
jmp 0x4d2908
mov ecx, dword [esi + 0x90]
test ecx, ecx
je 0x4d2a7f
mov eax, dword [esi + 0x84]
test eax, eax
je 0x4d2a7b
mov ebx, dword [esi + 0x88]
test ebx, ebx
je 0x4d2a77
mov edx, dword [eax]
cmp edx, edi
jae 0x4d2a77
mov ecx, dword [eax + 8]
mov ebx, dword [ebx + 8]
cmp ebx, ecx
sbb eax, eax
neg eax
mov dword [esp + 0x40], eax
je 0x4d2929
mov eax, dword [esi + 0x9c]
test eax, eax
jne 0x4d263b
xor eax, eax
jmp 0x4d2646
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 0x4d265b
sub edi, eax
jmp 0x4d265d
xor edi, edi
test eax, eax
jbe 0x4d2a61
test edi, edi
jbe 0x4d2a61
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 0x4d2a61
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 0x4d278a
mov edx, dword [esi + 0x8c]
mov dword [esp + 0x40], 0xffffffff
cmp edx, ecx
jle 0x4d2738
lea ebx, [esi + 4]
mov eax, dword [ebx]
test eax, eax
je 0x4d2721
mov ebp, dword [esi + 0x84]
mov eax, dword [eax + 8]
cmp eax, dword [ebp + 8]
jae 0x4d2734
cmp eax, edi
jae 0x4d2734
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 0x4d2705
jmp 0x4d2738
mov ebp, dword [esp + 0x18]
mov eax, dword [esi + 0x90]
test eax, eax
je 0x4d2750
mov eax, dword [esp + 0x40]
cmp eax, edx
jae 0x4d2750
mov ecx, dword [esi + eax*4 + 4]
jmp 0x4d2752
xor ecx, ecx
mov edx, dword [esi + 0x84]
mov edx, dword [edx + 8]
cmp edi, edx
ja 0x4d277e
test ecx, ecx
je 0x4d277e
mov eax, dword [ecx + 8]
mov ebx, dword [esp + 0x20]
cmp eax, ebx
jbe 0x4d277e
cmp eax, edx
jae 0x4d277e
mov edx, dword [ecx]
sub eax, edi
add eax, edx
mov dword [esp + 0x30], eax
jmp 0x4d2790
mov edi, ebp
mov dword [esp + 0x30], 0
jmp 0x4d2790
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 0x4d28ed
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 0x4d28ed
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 0x4d28ed
cmp dword [esp + 0x40], edi
jne 0x4d28ed
mov ecx, dword [esi + 0x84]
mov eax, dword [esi + 0x9c]
test eax, eax
mov ebx, dword [ecx + 8]
mov dword [esp + 0x40], 0
je 0x4d28ed
mov edx, dword [esi + 0x98]
push 0
push 0
push ebx
push edx
call ebp
cmp eax, ebx
jne 0x4d28ed
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 0x4d28ed
cmp dword [esp + 0x40], ebx
jne 0x4d28ed
mov eax, dword [esp + 0x3c]
test eax, eax
je 0x4d28e5
lea edx, [esp + 0x24]
test edx, edx
je 0x4d28e5
mov ecx, dword [esp + 0x44]
test ecx, ecx
je 0x4d28e5
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 0x4d28df
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 0x4d28d3
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 0x4d28ed
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 0x4d2a6b
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 0x4d2a61
test ecx, ecx
jbe 0x4d2a61
sub eax, ebx
add eax, ecx
mov ecx, dword [esp + 0x44]
cmp eax, ecx
jbe 0x4d2a61
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 0x4d2a53
mov eax, dword [esi + 0x98]
push ebx
push ebx
push ebx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
test eax, eax
jne 0x4d2a53
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 0x4d2a53
cmp dword [esp + 0x44], edi
jne 0x4d2a53
mov eax, dword [esp + 0x3c]
cmp eax, ebx
je 0x4d2a4f
lea ecx, [esp + 0x24]
test ecx, ecx
je 0x4d2a4f
cmp ebp, ebx
je 0x4d2a4f
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 0x4d2a3d
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 0x4d2904
mov dword [esp + 0x10], ebx
push ebp
call sub.MFC42.DLL_operatordelete
add esp, 4
jmp 0x4d2904
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 0x4d2ad2
mov eax, dword [esi + 0x88]
mov ecx, dword [esi + 0x84]
test eax, eax
jne 0x4d2aa5
test ecx, ecx
jne 0x4d2abb
pop edi
pop esi
mov dword [ebx], 2
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0x14
test ecx, ecx
jne 0x4d2abb
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 0x4d2a6b
cmp dword [esi], edi
jb 0x4d2a6b
pop edi
pop esi
mov dword [ebx], 3
pop ebp
xor eax, eax
pop ebx
add esp, 0x24
ret 0x14