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

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
and esp, 0xfffffff0
sub esp, 0x30
mov esi, dword [ebp + 8]
mov ebx, dword [ebp + 0xc]
call fcn.004017b0
mov eax, dword [fcn.00402850]
mov dword [esp], 2
mov dword [esp + 0x28], eax
call eax
mov dword [esp + 0x10], str.12:05:12
mov dword [esp + 0xc], str.Feb__9_2023
mov dword [esp + 8], str.snip_0.1
mov dword [esp + 4], str._s__s__s_n_n
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
cmp esi, 1
jle 0x402b6e
mov eax, dword [ebx + esi*4 - 4]
cmp byte [eax], 0x2d
je 0x402b6e
mov dword [esp + 8], 0x400
mov dword [esp + 4], eax
mov dword [esp], 0x4057e0
call sub.msvcrt.dll_strncpy
mov dword [esp + 4], 0x40411f
mov dword [esp], 0x4057e0
call sub.msvcrt.dll_fopen
mov ebx, eax
test eax, eax
je 0x402bc4
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov dword [esp], eax
call sub.msvcrt.dll_fseek
mov dword [esp], ebx
call sub.msvcrt.dll_ftell
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], ebx
mov dword [0x405be4], eax
call sub.msvcrt.dll_fseek
mov esi, dword [0x405be4]
test esi, esi
je 0x402bb0
mov dword [esp], esi
call sub.msvcrt.dll_malloc
mov dword [0x405be0], eax
test eax, eax
je 0x402ba0
mov dword [esp + 0xc], ebx
mov dword [esp + 8], esi
mov dword [esp + 4], 1
mov dword [esp], eax
call sub.msvcrt.dll_fread
test eax, eax
je 0x402b8c
mov dword [esp], 2
mov eax, dword [esp + 0x28]
xor ebx, ebx
call eax
mov dword [esp + 8], 0x4057e0
mov dword [esp + 4], str....reading___s_n
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
cmp dword [0x405be4], 0xd
jg 0x4029eb
jmp 0x402b1c
mov eax, dword [0x405be4]
add ebx, 1
sub eax, 0xd
cmp eax, ebx
jle 0x402b1c
mov edx, dword [0x405be0]
lea eax, [edx + ebx]
cmp dword [eax], 0x50494e53
jne 0x4029d8
cmp dword [eax + 4], 0x72617453
jne 0x4029d8
cmp word [eax + 8], 0x74
jne 0x4029d8
lea edi, [ebx + 0xa]
mov dword [esp + 8], 0x3ff
add edx, edi
mov dword [esp], 0x4053e0
mov dword [esp + 4], edx
call sub.msvcrt.dll_strncpy
mov dword [esp + 4], 0x4041d0
mov dword [esp], 0x4053e0
call sub.msvcrt.dll_fopen
mov dword [esp + 0x2c], eax
test eax, eax
je 0x402b78
mov dword [esp], 2
mov eax, dword [esp + 0x28]
call eax
mov dword [esp + 8], 0x4053e0
mov dword [esp + 4], str....snipping__s_n
mov dword [esp], eax
call sub.msvcrt.dll_fprintf
mov esi, dword [0x405be0]
add edi, esi
mov dword [esp], edi
call sub.msvcrt.dll_strlen
lea edi, [ebx + eax + 0xb]
mov eax, dword [0x405be4]
lea ecx, [eax - 0xd]
cmp ecx, edi
jle 0x402b64
mov ebx, edi
jmp 0x402ab6
mov eax, 1
mov edx, ebx
add ebx, 1
test eax, eax
je 0x402ae0
cmp ecx, ebx
je 0x402b58
lea eax, [esi + ebx]
cmp dword [eax], 0x50494e53
jne 0x402aa0
cmp word [eax + 4], 0x6e45
jne 0x402aa0
cmp byte [eax + 6], 0x64
jne 0x402aa0
xor eax, eax
mov edx, ebx
add ebx, 1
test eax, eax
jne 0x402aae
lea esi, [esi]
mov eax, dword [esp + 0x2c]
sub edx, edi
add esi, edi
mov dword [esp + 8], 1
mov dword [esp + 4], edx
mov dword [esp + 0xc], eax
mov dword [esp], esi
call sub.msvcrt.dll_fwrite
mov eax, dword [esp + 0x2c]
mov dword [esp], eax
call sub.msvcrt.dll_fclose
mov eax, dword [0x405be4]
sub eax, 0xd
cmp eax, ebx
jg 0x4029eb
mov dword [esp], 2
mov eax, dword [esp + 0x28]
call eax
mov dword [esp + 8], 8
mov dword [esp + 0xc], eax
mov dword [esp + 4], 1
mov dword [esp], str....done_n
call sub.msvcrt.dll_fwrite
lea esp, [ebp - 0xc]
xor eax, eax
pop ebx
pop esi
pop edi
pop ebp
ret
lea eax, [edx + 2]
mov edx, ebx
mov ebx, eax
jmp 0x402ae0
lea ebx, [edi + 1]
mov edx, edi
jmp 0x402ae0
mov eax, dword [ebx]
mov dword [esp], eax
call fcn.004015f0
mov dword [esp + 4], 0x4053e0
mov dword [esp], str.Couldnt_open__s_for_writing._n
call fcn.00401530
mov dword [esp + 4], 0x4057e0
mov dword [esp], str.Couldnt_read_from__s_n
call fcn.00401530
mov dword [esp + 4], esi
mov dword [esp], str.Couldnt_allocate__d_bytes_to_hold_bin_n
call fcn.00401530
mov dword [esp + 4], 0x4057e0
mov dword [esp], str.The_file_size_of__s_is_0_bytes._n
call fcn.00401530
mov dword [esp + 4], 0x4057e0
mov dword [esp], str.Couldnt_open__s_for_reading._n
call fcn.00401530
nop
nop
nop
nop
nop
nop
nop
nop
jmp fcn.00401500