Function at 0x40ff60
Capabilities:
Get common file path
Get file size
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x3ac
cmp dword [ebp + 0xc], 6
push ebx
push esi
push edi
jne 0x40ffda
lea eax, [ebp - 0x80]
push 0x64
push eax
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
jne 0x40ff8d
push str.Cant_get_the_default_Windows_Directory_n
call fcn.004099b6
pop ecx
push dword [ebp + 8]
lea eax, [ebp - 0x80]
push eax
lea eax, [ebp - 0x180]
push str._s_s
push eax
call dword [sym.imp.USER32.dll_wsprintfA]
add esp, 0x10
xor ebx, ebx
lea eax, [ebp - 0x180]
push ebx
push 2
push 4
push ebx
push ebx
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x410014
push str.Softwrap_cannot_find_one_of_the_System_License_Files._nThis_program_cannot_continue._If_the_problem_persists__ncontact_Softwrap_support__details_on_http:__www.softwrap.com_
call fcn.00410576
jmp 0x4101dd
xor ebx, ebx
push ebx
push 0x80
push 3
push ebx
push ebx
push closesocket
push dword [0x42de58]
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, 0xffffffff
jne 0x410014
push dword [0x42de58]
push str.Softwrap_cannot_find_the_file:__s._nThis_program_cannot_continue._If_the_problem_persists__ncontact_Softwrap_support__details_on_http:__www.softwrap.com_
call fcn.00410576
pop ecx
jmp 0x4101dd
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov esi, eax
push esi
call fcn.004179b4
cmp esi, ebx
pop ecx
mov dword [ebp - 0xc], eax
mov dword [ebp - 4], ebx
je 0x41016e
lea ecx, [ebp - 0x1c]
push ebx
push ecx
push esi
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x410199
cmp dword [ebp - 0x1c], esi
jne 0x410199
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push esi
call fcn.004179b4
mov dword [ebp - 8], eax
mov eax, dword [ebp - 0xc]
pop ecx
mov dword [ebp + 8], eax
lea esi, [eax + esi - 0x230]
cmp eax, esi
mov dword [ebp - 0x18], esi
ja 0x4100ef
push 2
lea eax, [ebp - 0x3ac]
push dword [ebp + 8]
push eax
call fcn.0040ced0
add esp, 0xc
cmp eax, ebx
mov dword [ebp - 0x10], eax
jbe 0x4100e4
sub esp, 0x22c
mov ecx, 0x8b
lea esi, [ebp - 0x3ac]
mov edi, esp
rep movsd dword es:[edi], dword [esi]
call fcn.0040eddb
add esp, 0x22c
test al, al
je 0x4100e4
cmp dword [ebp - 0x184], 0xface0ff1
jne 0x4100e4
mov esi, dword [ebp - 0x10]
mov eax, dword [ebp - 8]
mov ecx, dword [ebp - 4]
push esi
push dword [ebp + 8]
add eax, ecx
push eax
call fcn.00417bc0
add dword [ebp + 8], 0x22f
add esp, 0xc
add dword [ebp - 4], esi
inc dword [ebp + 8]
mov eax, dword [ebp + 8]
cmp eax, dword [ebp - 0x18]
jbe 0x410077
push dword [ebp - 0xc]
call fcn.00417985
cmp dword [ebp + 0xc], 6
pop ecx
lea eax, [ebp - 0x180]
je 0x410109
mov eax, dword [0x42de58]
push ebx
push 2
push 5
push ebx
push ebx
push 0x40000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
cmp esi, 0xffffffff
jne 0x410142
cmp dword [ebp + 0xc], 6
mov eax, str.System_File
je 0x410133
mov eax, dword [0x42de58]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__ld_getting_handle_to:__s_nThis_program_cannot_continue._If_the_problem_persists__ncontact_Softwrap_support__details_on_http:__www.softwrap.com_
jmp 0x41018f
mov edi, dword [ebp - 4]
lea eax, [ebp - 0x14]
push ebx
push eax
push edi
push dword [ebp - 8]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x410172
cmp dword [ebp - 0x14], edi
jne 0x410172
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 8]
call fcn.00417985
pop ecx
mov al, 1
jmp 0x4101e0
cmp dword [ebp + 0xc], 6
mov eax, str.System_File
je 0x410182
mov eax, dword [0x42de58]
push eax
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Error__ld_writing_to:__s_nThis_program_cannot_continue._If_the_problem_persists__ncontact_Softwrap_support__details_on_http:__www.softwrap.com_
call fcn.00410576
add esp, 0xc
jmp 0x4101de
cmp dword [ebp + 0xc], 6
jne 0x4101b4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Read_operation_from_a_System_File_resulted_in_Error__ld._nThis_program_cannot_continue._If_the_problem_persists__ncontact_Softwrap_support__details_on_http:__www.softwrap.com_
call fcn.00410576
pop ecx
pop ecx
jmp 0x4101ce
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push dword [0x42de58]
push str.Read_operation_from__s_resulted_in_Error__ld._nThis_program_cannot_continue._If_the_problem_persists__ncontact_Softwrap_support__details_on_http:__www.softwrap.com_
call fcn.00410576
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push dword [ebp - 0xc]
call fcn.00417985
pop ecx
xor al, al
pop edi
pop esi
pop ebx
leave
ret