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

Disassembly:
mov eax, 0x6018
call fcn.005322e0
push ebp
push esi
push edi
mov edi, ecx
xor esi, esi
push 0x585938
mov dword [esp + 0x24], edi
mov dword [esp + 0x1c], esi
call fcn.004b1a80
mov ebp, eax
test ebp, ebp
jne 0x4b1e7f
push 0x58593c
mov ecx, edi
call fcn.004b1a80
mov ebp, eax
test ebp, ebp
je 0x4b2162
mov esi, dword [esp + 0x6028]
xor eax, eax
mov ecx, 3
push ebx
mov ah, byte [esi + 2]
xor ebx, ebx
mov al, byte [esi + 5]
cdq
idiv ecx
cmp edx, 1
jne 0x4b1ec2
mov ecx, dword [edi + 0x28]
mov edx, dword [edi + 0x114]
test ecx, ecx
jle 0x4b1ebf
mov eax, dword [edi + 0x2c]
mov edi, ecx
add eax, 5
xor ecx, ecx
mov cl, byte [eax]
add eax, 0x18
add ebx, ecx
dec edi
jne 0x4b1eb3
imul ebx, edx
mov ecx, 0x7ff
xor eax, eax
lea edi, [esp + 0x29]
mov byte [esp + 0x28], 0
rep stosd dword es:[edi], eax
mov edx, dword [esp + 0x6030]
stosw word es:[edi], ax
stosb byte es:[edi], al
mov al, byte [esi + 4]
mov dword [esp + 0x18], edx
test al, al
jne 0x4b1ff1
mov edi, dword [esi + 8]
push 0
shr edi, 3
lea eax, [edi + ebx]
push eax
push ebp
mov dword [esp + 0x20], eax
call dword [sym.imp.MSVCRT.dll_fseek]
add esp, 0xc
mov ecx, esi
call fcn.004c9d50
mov ebx, eax
mov eax, dword [esi + 8]
push ebp
lea eax, [eax + ebx - 1]
shr eax, 3
sub eax, edi
inc eax
mov dword [esp + 0x14], eax
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, dword [esp + 0x18]
add esp, 4
cmp eax, ecx
jne 0x4b1fe7
mov ecx, dword [esp + 0x10]
push ebp
push ecx
lea edx, [esp + 0x30]
push 1
push edx
call dword [sym.imp.MSVCRT.dll_fread]
mov esi, dword [esi + 8]
add esp, 0x10
and esi, 7
xor ecx, ecx
test ebx, ebx
jle 0x4b1fe7
mov eax, ecx
cdq
and edx, 7
add eax, edx
mov edx, dword [esp + 0x6030]
sar eax, 3
mov al, byte [eax + edx]
mov edx, ecx
and edx, 0x80000007
jns 0x4b1f81
dec edx
or edx, 0xfffffff8
inc edx
test byte [edx*4 + 0x67a8e4], al
mov eax, esi
cdq
je 0x4b1fb4
and edx, 7
add eax, edx
sar eax, 3
lea edi, [esp + eax + 0x28]
mov eax, esi
and eax, 0x80000007
jns 0x4b1fa7
dec eax
or eax, 0xfffffff8
inc eax
mov dl, byte [eax*4 + 0x67a8e4]
mov al, byte [edi]
or al, dl
jmp 0x4b1fdb
and edx, 7
add eax, edx
sar eax, 3
lea edi, [esp + eax + 0x28]
mov eax, esi
and eax, 0x80000007
jns 0x4b1fce
dec eax
or eax, 0xfffffff8
inc eax
mov dl, byte [eax*4 + 0x67a8e4]
mov al, byte [edi]
not dl
and al, dl
inc ecx
inc esi
cmp ecx, ebx
mov byte [edi], al
jl 0x4b1f5d
lea eax, [esp + 0x28]
mov dword [esp + 0x18], eax
jmp 0x4b2037
mov ecx, dword [esi + 8]
xor edi, edi
lea edx, [ebx + ecx*2]
mov dword [esp + 0x14], edx
mov edx, dword [esp + 0x24]
mov ecx, dword [edx + 0x28]
test ecx, ecx
jle 0x4b201a
mov eax, dword [edx + 0x2c]
add eax, 5
xor ebx, ebx
mov bl, byte [eax]
add eax, 0x18
add edi, ebx
dec ecx
jne 0x4b200e
mov ebx, dword [edx + 0x24]
mov ecx, esi
call fcn.004c9d30
imul edi, ebx
sub edi, dword [esp + 0x14]
cmp edi, eax
mov dword [esp + 0x10], edi
jl 0x4b2037
mov dword [esp + 0x10], eax
mov eax, dword [esp + 0x10]
test eax, eax
jle 0x4b20e0
mov ebx, dword [sym.imp.MSVCRT.dll_fwrite]
mov dword [esp + 0x20], 4
mov edi, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push 0
push ebp
call edi
push ebp
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, dword [esp + 0x24]
add esp, 0x10
mov esi, ecx
sub esi, eax
test esi, esi
jle 0x4b20c4
mov ecx, 0xfff
xor eax, eax
lea edi, [esp + 0x2029]
mov byte [esp + 0x2028], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
cmp esi, 0x4000
mov edi, esi
jl 0x4b209e
mov edi, 0x4000
push ebp
push 1
lea eax, [esp + 0x2030]
push edi
push eax
call ebx
sub esi, edi
add esp, 0x10
test esi, esi
jg 0x4b208f
mov eax, dword [esp + 0x20]
dec eax
test eax, eax
mov dword [esp + 0x20], eax
jg 0x4b2051
jmp 0x4b20e0
push 0
push ecx
push ebp
call edi
mov ecx, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
push ebp
push 1
push ecx
push edx
call ebx
add esp, 0x1c
mov dword [esp + 0x1c], eax
call fcn.00488f40
mov ecx, eax
call fcn.004752c0
cmp eax, 0x80
pop ebx
jl 0x4b2107
call fcn.00488f40
mov ecx, eax
call fcn.004752c0
cmp eax, 0x96
jl 0x4b213c
call fcn.00488f40
mov ecx, eax
call fcn.004752c0
cmp eax, 0x96
jl 0x4b212d
call fcn.00488f40
mov ecx, eax
call fcn.004752c0
cmp eax, 0xe6
jl 0x4b213c
push 0
call fcn.0046dfc0
add esp, 4
cmp eax, 3
jl 0x4b2148
call fcn.00489210
mov ecx, eax
call fcn.004891a0
mov ecx, dword [esp + 0x20]
push ebp
call fcn.004b1b00
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
add esp, 0x6018
ret 8
mov eax, esi
pop edi
pop esi
pop ebp
add esp, 0x6018
ret 8