Function at 0x4b3010
Capabilities:
Read file on windows
Write file on windows

Disassembly:
mov eax, 0x1054
call fcn.0051c710
push ebx
push ebp
push esi
push edi
mov edi, ecx
push 0x2580
mov dword [esp + 0x14], edi
call fcn.00487160
mov ecx, eax
call fcn.004839e0
mov esi, dword [esp + 0x1068]
mov ebp, dword [sym.imp.MSVCRT.dll_fopen]
push 0x56c98c
push esi
mov dword [esp + 0x1c], eax
call ebp
mov ebx, eax
add esp, 8
test ebx, ebx
jne 0x4b30ff
push 0x56c990
push esi
call ebp
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x4b323c
lea ecx, [esp + 0x54]
call fcn.00477610
lea ecx, [esp + 0x2c]
call fcn.00477630
mov ax, word [0x659a28]
mov dword [esp + 0x20], 0xf800
movsx ecx, word [edi]
mov word [esp + 0x3a], ax
mov dword [esp + 0x24], 0x7e0
movsx eax, word [edi + 4]
sub eax, ecx
mov ecx, dword [esp + 0x14]
inc eax
mov dword [esp + 0x28], 0x1f
cmp ecx, eax
mov dword [esp + 0x3c], 3
mov dword [esp + 0x30], ecx
jg 0x4b30c7
mov dword [esp + 0x30], eax
mov ebp, dword [esp + 0x5e]
mov esi, dword [sym.imp.MSVCRT.dll_fwrite]
push ebx
push 0xe
lea edx, [esp + 0x5c]
add ebp, 0xc
push 1
push edx
mov dword [esp + 0x6e], ebp
call esi
push ebx
push 0x28
lea eax, [esp + 0x44]
push 1
push eax
call esi
push ebx
push 0xc
lea ecx, [esp + 0x48]
push 1
push ecx
call esi
add esp, 0x30
lea ecx, [esp + 0x2c]
call fcn.00477630
mov esi, dword [sym.imp.MSVCRT.dll_fseek]
push 0
push 0xe
push ebx
call esi
push ebx
push 0x28
lea edx, [esp + 0x40]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
mov ebp, dword [0x659a28]
mov edx, dword [esp + 0x50]
imul ebp, dword [esp + 0x4c]
movsx eax, word [edi + 6]
movsx ecx, word [edi + 2]
add ebp, 0x1f
sub eax, ecx
sar ebp, 3
and ebp, 0xfffffffc
lea eax, [edx + eax + 1]
mov ecx, ebp
push 0
imul ecx, eax
push 0xe
push ebx
mov dword [esp + 0x5c], eax
mov dword [esp + 0x68], ecx
call esi
push ebx
push 0x28
lea edx, [esp + 0x5c]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
push 2
push 0
push ebx
call esi
movsx esi, word [edi + 4]
movsx eax, word [edi]
sub esi, eax
add esp, 0x44
inc esi
mov ecx, 0x400
imul esi, dword [0x659a28]
or eax, 0xffffffff
lea edi, [esp + 0x64]
add esi, 0x1f
rep stosd dword es:[edi], eax
mov edi, dword [esp + 0x10]
sar esi, 3
mov ecx, dword [edi + 8]
and esi, 0xfffffffc
cmp esi, ebp
mov dword [esp + 0x10], ecx
mov dword [esp + 0x18], esi
jl 0x4b31b8
mov dword [esp + 0x18], ebp
movsx edx, word [edi + 6]
movsx eax, word [edi + 2]
sub edx, eax
mov dword [esp + 0x14], 0
inc edx
test edx, edx
jle 0x4b3220
sub ebp, dword [esp + 0x18]
mov dword [esp + 0x1c], ebp
mov ecx, dword [esp + 0x18]
mov edx, dword [esp + 0x10]
mov ebp, dword [sym.imp.MSVCRT.dll_fwrite]
push ebx
push ecx
push 1
push edx
call ebp
mov eax, dword [esp + 0x2c]
push ebx
push eax
lea ecx, [esp + 0x7c]
push 1
push ecx
call ebp
mov edx, dword [esp + 0x30]
mov eax, dword [esp + 0x34]
movsx ecx, word [edi + 2]
add edx, esi
add esp, 0x20
mov dword [esp + 0x10], edx
inc eax
movsx edx, word [edi + 6]
sub edx, ecx
mov dword [esp + 0x14], eax
inc edx
cmp eax, edx
jl 0x4b31d7
push ebx
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 4
mov eax, 1
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x1054
ret 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x1054
ret 4