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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x10038
call fcn.00417a50
mov eax, dword [0x423020]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 8]
push ebx
push esi
push edi
mov edi, dword [sym.imp.KERNEL32.dll_CreateFileW]
push 0
push 0x80
push 3
push 0
push 1
push 0x80000000
push eax
mov esi, edx
mov dword [ebp - 0x1002c], eax
mov dword [ebp - 0x10034], ecx
call edi
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x4025b7
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
lea edx, [ebp - 0x10030]
push edx
push 0x400
mov esi, eax
push esi
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov eax, dword [ebp - 0x10030]
push eax
push esi
push str._d:__s
mov ecx, 0x100
mov ebx, 0x4c48e0
call fcn.00403b90
mov ecx, dword [ebp - 0x1002c]
push ebx
push ecx
push str.Cannot_create__s__s
call fcn.00403ce0
add esp, 0x18
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a3ae
mov esp, ebp
pop ebp
ret
mov edx, dword [ebp - 0x10034]
push 0
push 0x80
push 2
push 0
push 1
push 0x40000000
push edx
call edi
mov edi, eax
cmp edi, 0xffffffff
jne 0x402643
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0
push 0
mov esi, eax
lea eax, [ebp - 0x1002c]
push eax
push 0x400
push esi
push 0
push 0x1300
call dword [sym.imp.KERNEL32.dll_FormatMessageW]
mov ecx, dword [ebp - 0x1002c]
push ecx
push esi
push str._d:__s
mov ecx, 0x100
mov ebx, 0x4c48e0
call fcn.00403b90
mov edx, dword [ebp - 0x10034]
push ebx
push edx
push str.Cannot_create__s__s
call fcn.00403ce0
add esp, 0x18
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a3ae
mov esp, ebp
pop ebp
ret
push 0
lea eax, [ebp - 0x10030]
push eax
push 0x10000
lea ecx, [ebp - 0x10004]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40270f
jmp 0x402670
mov eax, dword [ebp - 0x10030]
test eax, eax
je 0x402748
push 0
lea edx, [ebp - 0x10038]
push edx
push eax
lea eax, [ebp - 0x10004]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
je 0x4027cf
mov eax, dword [ebp - 0x10030]
cdq
add dword [esi + 0x38], eax
push 0
push 0x64
adc dword [esi + 0x3c], edx
mov ecx, dword [esi + 0x3c]
mov edx, dword [esi + 0x38]
push ecx
push edx
call fcn.00415980
mov ecx, dword [0x4c2d1c]
push ecx
mov ecx, dword [0x4c2d18]
push ecx
push edx
push eax
call fcn.004189f0
cmp eax, dword [esi + 0x54]
je 0x4026eb
mov edx, dword [esi + 0x40]
push 0
push eax
push 0x402
push edx
mov dword [esi + 0x54], eax
call dword [sym.imp.USER32.dll_SendMessageW]
push 0
lea eax, [ebp - 0x10030]
push eax
push 0x10000
lea ecx, [ebp - 0x10004]
push ecx
push ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x402670
call fcn.00403bf0
push eax
mov eax, dword [ebp - 0x1002c]
push eax
push str.read_error__s__s
call fcn.00403ce0
add esp, 0xc
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
push edi
call esi
pop edi
pop esi
xor al, al
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040a3ae
mov esp, ebp
pop ebp
ret
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
mov ebx, dword [ebp - 0x1002c]
lea edx, [ebp - 0x10028]
push edx
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileAttributesExW]
test eax, eax
jne 0x40277f
call fcn.00403bf0
push eax
push ebx
push str.GetFileAttributesEx_failed__s__s_n
call fcn.00403ce0
add esp, 0xc
lea eax, [ebp - 0x10014]
push eax
lea ecx, [ebp - 0x1001c]
push ecx
lea edx, [ebp - 0x10024]
push edx
push edi
call dword [sym.imp.KERNEL32.dll_SetFileTime]
test eax, eax
jne 0x4027b9
call fcn.00403bf0
push eax
mov eax, dword [ebp - 0x10034]
push eax
push str.SetFileTime_failed__s__s_n
call fcn.00403ce0
add esp, 0xc
push edi
call esi
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
mov al, 1
pop ebx
call fcn.0040a3ae
mov esp, ebp
pop ebp
ret
call fcn.00403bf0
mov ecx, dword [ebp - 0x10034]
push eax
push ecx
push str.file_write_to__s_error__s
call fcn.00403ce0
mov edx, dword [esi + 0x44]
add esp, 0xc
push str.Writing_failed
push edx
call dword [sym.imp.USER32.dll_SetWindowTextW]
jmp 0x402729