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

Disassembly:
push ebp
mov ebp, esp
push esi
push ebx
mov eax, 0x1060
call fcn.004d7290
sub esp, eax
mov dword [ebp - 0xc], 1
mov dword [ebp - 0x14], 0
mov dword [ebp - 0x18], 0
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x1c], 0
cmp dword [ebp + 0x10], 0
jne 0x48e9b6
mov eax, 0x5035ea
jmp 0x48e9bb
mov eax, 0x5035ed
mov dword [esp + 4], eax
mov eax, dword [ebp + 8]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x2c], 0
jne 0x48ea2c
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 0x18], ebx
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unable_to_read_merged_file:__s_due_to____d____s__.
mov dword [esp + 8], str.UnmergeFiles
mov dword [esp + 4], 0x282
mov dword [esp], str.shared_file_op.c
call dbg._merror
mov eax, 0
jmp 0x48efa4
cmp dword [ebp + 0x14], 0
jne 0x48ea34
jmp 0x48ea54
mov dword [ebp - 0x14], 0
jmp 0x48ea41
add dword [ebp - 0x14], 1
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov edx, dword [ebp - 0x14]
shl edx, 2
add eax, edx
mov eax, dword [eax]
test eax, eax
jne 0x48ea3d
mov eax, esp
mov ebx, eax
mov eax, dword [ebp - 0x2c]
mov dword [esp + 8], eax
mov dword [esp + 4], 0x800
lea eax, [ebp - 0x103e]
mov dword [esp], eax
call sym._fgets
test eax, eax
je 0x48ef72
movzx eax, byte [ebp - 0x103e]
cmp al, 0x21
jne 0x48ef7c
lea eax, [ebp - 0x103e]
add eax, 1
mov dword [esp], eax
call sym._atol
mov dword [ebp - 0x1c], eax
mov dword [esp + 4], 0xa
lea eax, [ebp - 0x103e]
mov dword [esp], eax
call sym._strchr
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
je 0x48eac5
mov eax, dword [ebp - 0x30]
mov byte [eax], 0
mov dword [esp + 4], 0x20
lea eax, [ebp - 0x103e]
mov dword [esp], eax
call sym._strchr
mov dword [ebp - 0x30], eax
cmp dword [ebp - 0x30], 0
jne 0x48eaf0
mov dword [ebp - 0xc], 0
jmp 0x48ef7c
add dword [ebp - 0x30], 1
mov dword [ebp - 0x10], 1
cmp dword [ebp + 0xc], 0
je 0x48eb7d
mov eax, dword [ebp - 0x30]
mov dword [esp + 0x10], eax
mov eax, dword [ebp + 0xc]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 0x503625
mov dword [esp + 4], 0x800
lea eax, [ebp - 0x83d]
mov dword [esp], eax
call sym._snprintf_59
lea eax, [ebp - 0x83d]
mov dword [esp], eax
call dbg.w_ref_parent_folder
test eax, eax
je 0x48eb9e
lea eax, [ebp - 0x83d]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unmerging__s:_unable_to_unmerge__s__it_contains_.._
mov dword [esp + 8], str.UnmergeFiles
mov dword [esp + 4], 0x2ac
mov dword [esp], str.shared_file_op.c
call dbg._merror
mov dword [ebp - 0x10], 0
jmp 0x48eb9e
mov dword [esp + 8], 0x800
mov eax, dword [ebp - 0x30]
mov dword [esp + 4], eax
lea eax, [ebp - 0x83d]
mov dword [esp], eax
call sym._strncpy
mov byte [ebp - 0x3d], 0
lea eax, [ebp - 0x83d]
mov dword [esp], eax
call sym._strdup
mov dword [ebp - 0x34], eax
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call dbg.dirname
mov dword [esp], eax
call dbg.mkdir_ex
test eax, eax
je 0x48ebff
mov eax, dword [ebp - 0x30]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unmerging__s:_couldnt_create_directory__s
mov dword [esp + 8], str.UnmergeFiles
mov dword [esp + 4], 0x2b9
mov dword [esp], str.shared_file_op.c
call dbg._merror
mov dword [ebp - 0x10], 0
mov eax, dword [ebp - 0x34]
mov dword [esp], eax
call sym._free
lea eax, [ebp - 0x83d]
mov dword [esp], eax
call sym._strlen
lea ecx, [eax + 7]
mov eax, ecx
sub eax, 1
mov dword [ebp - 0x38], eax
mov eax, 0x10
sub eax, 1
add eax, ecx
mov esi, 0x10
mov edx, 0
div esi
imul eax, eax, 0x10
call fcn.004d7290
sub esp, eax
lea eax, [esp + 0x1c]
add eax, 0
mov dword [ebp - 0x3c], eax
lea eax, [ebp - 0x83d]
mov dword [esp + 0xc], eax
mov dword [esp + 8], str._sXXXXXX
mov dword [esp + 4], ecx
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym._snprintf_59
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dbg.mkstemp_ex
cmp eax, 0xffffffff
jne 0x48ecb7
mov eax, dword [ebp - 0x30]
mov dword [esp + 0x14], eax
mov eax, dword [ebp + 8]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unmerging__s:_could_not_create_temporary_file_for__s
mov dword [esp + 8], str.UnmergeFiles
mov dword [esp + 4], 0x2c4
mov dword [esp], str.shared_file_op.c
call dbg._merror
mov dword [ebp - 0x10], 0
cmp dword [ebp - 0x10], 0
je 0x48ed43
cmp dword [ebp + 0x10], 0
jne 0x48ecce
mov eax, 0x5036d9
jmp 0x48ecd3
mov eax, 0x5036dc
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym._fopen
mov dword [ebp - 0x24], eax
cmp dword [ebp - 0x24], 0
jne 0x48ed51
mov dword [ebp - 0xc], 0
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov esi, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 0x18], esi
mov dword [esp + 0x14], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], str.Unable_to_unmerge_file__s_due_to____d____s__.
mov dword [esp + 8], str.UnmergeFiles
mov dword [esp + 4], 0x2cd
mov dword [esp], str.shared_file_op.c
call dbg._merror
jmp 0x48ed51
mov dword [ebp - 0x24], 0
mov dword [ebp - 0xc], 0
cmp dword [ebp - 0x1c], 0x7ff
ja 0x48ed69
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], 0
jmp 0x48eddd
mov dword [ebp - 0x18], 0x800
sub dword [ebp - 0x1c], 0x800
jmp 0x48eddd
lea edx, [ebp - 0x103e]
mov eax, dword [ebp - 0x28]
add eax, edx
mov byte [eax], 0
cmp dword [ebp - 0x24], 0
je 0x48edb1
mov eax, dword [ebp - 0x24]
mov dword [esp + 0xc], eax
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x28]
mov dword [esp + 4], eax
lea eax, [ebp - 0x103e]
mov dword [esp], eax
call sym._fwrite
cmp dword [ebp - 0x1c], 0
je 0x48ee10
cmp dword [ebp - 0x1c], 0x7ff
ja 0x48edcf
mov eax, dword [ebp - 0x1c]
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x1c], 0
jmp 0x48eddd
mov dword [ebp - 0x18], 0x800
sub dword [ebp - 0x1c], 0x800
mov eax, dword [ebp - 0x2c]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x18]
mov dword [esp + 8], eax
mov dword [esp + 4], 1
lea eax, [ebp - 0x103e]
mov dword [esp], eax
call sym._fread
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x48ed79
jmp 0x48ee11
nop
cmp dword [ebp - 0x24], 0
je 0x48ee22
mov eax, dword [ebp - 0x24]
mov dword [esp], eax
call sym._fclose
lea eax, [ebp - 0x83d]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call dbg.rename_ex
test eax, eax
je 0x48ee52
mov eax, dword [ebp - 0x3c]
mov dword [esp], eax
call sym._unlink
mov dword [ebp - 0xc], 0
jmp 0x48ef72
cmp dword [ebp + 0x14], 0
je 0x48ef6b
mov dword [esp + 4], 0x2f
lea eax, [ebp - 0x83d]
mov dword [esp], eax
call sym._strrchr
mov dword [ebp - 0x20], eax
cmp dword [ebp - 0x20], 0
je 0x48ee81
add dword [ebp - 0x20], 1
jmp 0x48ee8a
lea eax, [ebp - 0x83d]
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x14]
add eax, 2
lea edx, [eax*4]
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov dword [esp + 4], edx
mov dword [esp], eax
call sym._realloc
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
test eax, eax
jne 0x48eefe
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x503710
mov dword [esp + 8], str.UnmergeFiles
mov dword [esp + 4], 0x306
mov dword [esp], str.shared_file_op.c
call dbg._merror_exit
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov edx, dword [ebp - 0x14]
shl edx, 2
lea esi, [eax + edx]
mov eax, dword [ebp - 0x20]
mov dword [esp], eax
call sym._strdup
mov dword [esi], eax
mov eax, dword [esi]
test eax, eax
jne 0x48ef67
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp], eax
call sym._strerror
mov ebx, eax
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov eax, dword [eax]
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], eax
mov dword [esp + 0xc], 0x503710
mov dword [esp + 8], str.UnmergeFiles
mov dword [esp + 4], 0x307
mov dword [esp], str.shared_file_op.c
call dbg._merror_exit
add dword [ebp - 0x14], 1
mov esp, ebx
jmp 0x48ea54
mov esp, ebx
cmp dword [ebp + 0x14], 0
jne 0x48ef83
jmp 0x48ef96
mov esp, ebx
jmp 0x48ea54
mov eax, dword [ebp + 0x14]
mov eax, dword [eax]
mov edx, dword [ebp - 0x14]
shl edx, 2
add eax, edx
mov dword [eax], 0
mov eax, dword [ebp - 0x2c]
mov dword [esp], eax
call sym._fclose
mov eax, dword [ebp - 0xc]
lea esp, [ebp - 8]
pop ebx
pop esi
pop ebp
ret