Function at 0x4bf930
Capabilities:
Check if file exists
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4ddac8
mov eax, dword fs:[0]
push eax
sub esp, 0x40
mov eax, dword [0x520b38]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, ecx
lea eax, [esi + 0xc]
xor ebx, ebx
push eax
mov dword [ebp - 0x48], ebx
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
jne 0x4bfa7a
push dword [esi + 0x124]
call fcn.004bf400
mov edi, eax
add esp, 4
test edi, edi
jne 0x4bf999
mov dword [esi + 0x114], 0xfffffffe
xor eax, eax
jmp 0x4bfbd0
lea eax, [ebp - 0x48]
push eax
push edi
lea eax, [ebp - 0x44]
push 0
push eax
call fcn.004c30b0
add esp, 0x10
mov ecx, dword [eax]
cmp dword [esi + 4], ecx
je 0x4bf9c5
mov dword [eax], ebx
mov eax, dword [esi + 4]
mov dword [esi + 4], ecx
test eax, eax
je 0x4bf9c5
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x4bf9d2
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
cmp dword [ebp - 0x48], ebx
jl 0x4bfa2d
mov eax, dword [esi + 4]
test eax, eax
je 0x4bfa2d
mov ebx, 1
mov ecx, esi
push ebx
call fcn.004bfd80
test eax, eax
je 0x4bfbce
mov ecx, edi
lea edx, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4bf9f8
push 0
lea eax, [ebp - 0x44]
mov dword [ebp - 0x44], 0
push eax
sub ecx, edx
push ecx
push edi
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4bfbc7
mov ecx, esi
call fcn.004c01a0
jmp 0x4bfbc7
cmp dword [0x520b28], ebx
je 0x4bfa6b
lea eax, [esi + 0xc]
push eax
lea ecx, [ebp - 0x28]
call fcn.00449610
lea eax, [ebp - 0x28]
mov dword [ebp - 4], 0
push eax
push 0x532290
call fcn.004c0240
add esp, 8
mov dword [0x520b28], 0
lea ecx, [ebp - 0x28]
call fcn.00439040
mov dword [esi + 0x114], 0xfffffffe
jmp 0x4bfbce
push 0
mov ecx, esi
call fcn.004bfd80
test eax, eax
je 0x4bf992
push 0
push 0
push 0
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 0
push dword [esi + 8]
call dword [sym.imp.KERNEL32.dll_GetFileSize]
push dword [esi + 0x124]
mov edi, eax
mov dword [ebp - 0x44], edi
call fcn.004bf400
mov edx, eax
add esp, 4
test edx, edx
je 0x4bfaff
mov ecx, edx
lea eax, [ecx + 1]
mov dword [ebp - 0x4c], eax
mov al, byte [ecx]
inc ecx
test al, al
jne 0x4bfac6
sub ecx, dword [ebp - 0x4c]
cmp edi, ecx
jae 0x4bfaff
lea eax, [ebp - 0x48]
push eax
push edx
lea eax, [ebp - 0x4c]
push 0
push eax
call fcn.004c30b0
add esp, 0x10
lea ecx, [esi + 4]
push eax
call fcn.004a6810
mov eax, dword [ebp - 0x4c]
test eax, eax
je 0x4bfb71
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
jmp 0x4bfb71
lea eax, [edi + 1]
push eax
call fcn.004c3760
add esp, 4
mov edi, eax
lea eax, [ebp - 0x4c]
push 0
push eax
push dword [ebp - 0x44]
mov byte [edi], bl
push edi
push dword [esi + 8]
mov dword [ebp - 0x4c], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x4bfb68
mov eax, dword [ebp - 0x44]
mov byte [edi + eax], bl
lea eax, [ebp - 0x48]
push eax
push edi
lea eax, [ebp - 0x44]
push 0
push eax
call fcn.004c30b0
add esp, 0x10
mov ecx, dword [eax]
cmp dword [esi + 4], ecx
je 0x4bfb5b
mov dword [eax], ebx
mov eax, dword [esi + 4]
mov dword [esi + 4], ecx
test eax, eax
je 0x4bfb5b
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x4bfb68
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
push edi
call fcn.004c3976
add esp, 4
cmp dword [ebp - 0x48], ebx
jl 0x4bfb89
cmp dword [esi + 4], ebx
je 0x4bfb89
mov ecx, esi
mov ebx, 1
call fcn.004c01a0
jmp 0x4bfbc7
mov dword [esi + 0x114], 0xfffffffe
cmp dword [0x520b2c], ebx
je 0x4bfbc7
lea eax, [esi + 0xc]
push eax
lea ecx, [ebp - 0x40]
call fcn.00449610
push 0x532260
push 0x532278
call fcn.004c01f0
add esp, 8
mov dword [0x520b2c], ebx
lea ecx, [ebp - 0x40]
call fcn.00439040
mov ecx, esi
call fcn.004bf340
mov eax, ebx
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.004c35dc
mov esp, ebp
pop ebp
ret