Function at 0x4013a0
Capabilities:
Delete file
Read file on windows
Write file on windows

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x1020
call fcn.0040e3e0
mov eax, dword [0x41a014]
xor eax, ebp
mov dword [ebp - 4], eax
mov eax, dword [ebp + 0xc]
push ebx
push esi
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fopen]
push edi
mov edi, dword [ebp + 8]
push 0x410210
push eax
mov dword [ebp - 0x1020], eax
call esi
mov ebx, eax
add esp, 8
mov dword [ebp - 0x1018], ebx
test ebx, ebx
je 0x4015e6
push 0x410214
push edi
call esi
add esp, 8
mov dword [ebp - 0x101c], eax
push ebx
test eax, eax
jne 0x401417
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
add esp, 4
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.0040e3c6
mov esp, ebp
pop ebp
ret
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
add esp, 4
test eax, eax
jne 0x4015c6
nop dword [eax + eax]
push 0xc01
lea eax, [ebp - 0x100c]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push 0x401
lea eax, [ebp - 0x408]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
push ebx
push 0x400
xor dl, dl
lea eax, [ebp - 0x408]
push 1
push eax
xor esi, esi
mov byte [ebp - 0x100d], dl
mov byte [ebp - 0x1014], dl
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fread]
mov ebx, eax
lea eax, [ebp - 0x408]
push 0xd
push eax
call sub.VCRUNTIME140.dll_strchr
add esp, 0x30
test eax, eax
je 0x401496
mov byte [eax + 2], 0
lea edi, [ebp - 0x408]
lea ecx, [edi + 1]
nop
mov al, byte [edi]
inc edi
test al, al
jne 0x4014a0
sub edi, ecx
mov eax, edi
sub eax, ebx
je 0x4014c1
push 1
push eax
push dword [ebp - 0x1018]
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fseek]
add esp, 0xc
push 5
lea eax, [ebp - 0x408]
push str.line
push eax
call dword [sym.imp.api_ms_win_crt_string_l1_1_0.dll_strncmp]
add esp, 0xc
test eax, eax
je 0x4015ae
xor ecx, ecx
test edi, edi
jle 0x401595
nop word [eax + eax]
mov al, byte [ebp + ecx - 0x408]
cmp al, 0x7b
je 0x401503
cmp al, 0x7d
je 0x401503
cmp al, 0x3b
jne 0x40153d
mov edx, dword [ebp - 0x1014]
mov bl, byte [ebp - 0x100d]
test dl, dl
jne 0x401549
test bl, bl
jne 0x401549
cmp byte [ebp + ecx - 0x407], 0xd
je 0x401549
mov byte [ebp + esi - 0x100c], al
mov byte [ebp + esi - 0x100b], 0xd
add esi, 2
mov byte [ebp + esi - 0x100c], 0xa
jmp 0x40158b
mov edx, dword [ebp - 0x1014]
mov bl, byte [ebp - 0x100d]
cmp al, 0x22
jne 0x401568
test ecx, ecx
jle 0x40155b
cmp byte [ebp + ecx - 0x409], 0x5c
je 0x401584
test bl, bl
sete dl
mov byte [ebp - 0x100d], dl
jmp 0x401584
cmp al, 0x2f
jne 0x401584
cmp byte [ebp + ecx - 0x407], al
mov ebx, 1
movzx edx, dl
cmove edx, ebx
mov dword [ebp - 0x1014], edx
mov byte [ebp + esi - 0x100c], al
inc ecx
inc esi
cmp ecx, edi
jl 0x4014f0
push dword [ebp - 0x101c]
lea eax, [ebp - 0x100c]
push esi
push 1
push eax
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fwrite]
add esp, 0x10
mov ebx, dword [ebp - 0x1018]
push ebx
call dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_feof]
add esp, 4
test eax, eax
je 0x401430
mov esi, dword [sym.imp.api_ms_win_crt_stdio_l1_1_0.dll_fclose]
push ebx
call esi
push dword [ebp - 0x101c]
call esi
push dword [ebp - 0x1020]
call dword [sym.imp.api_ms_win_crt_filesystem_l1_1_0.dll_remove]
add esp, 0xc
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.0040e3c6
mov esp, ebp
pop ebp
ret