Function at 0x40ade0
Capabilities:
Delete file
Read file on windows

Disassembly:
push ebp
mov ebp, esp
push edi
mov edi, eax
push esi
push ebx
lea ebx, [ebp - 0x184]
sub esp, 0x1cc
mov dword [ebp - 0x1a0], eax
mov eax, dword [sym.imp.msvcrt.dll__open]
mov dword [esp + 8], 0x180
mov dword [esp + 4], 0x8102
mov dword [esp], str.fdopen.tst
mov dword [ebp - 0x1ac], eax
call eax
mov dword [esp + 4], 0x62b
mov dword [esp], 0x45a2c0
mov esi, eax
call fcn.0044c860
xor eax, eax
cmp esi, 0xffffffff
mov dword [esp + 4], str.Couldnt_create_test_file_n
setne al
mov dword [esp], eax
call fcn.0044cad0
mov eax, edi
call fcn.0040a320
mov dword [esp + 8], esi
mov dword [esp + 4], 0x45a517
mov dword [esp], ebx
mov dword [ebp - 0x174], eax
mov dword [ebp - 0x170], 0x45a50a
mov dword [ebp - 0x16c], str.inherit
mov dword [ebp - 0x168], ebx
call fcn.0040aaa0
lea eax, [ebp - 0x174]
mov dword [esp + 4], edi
mov dword [esp + 8], eax
mov eax, dword [sym.imp.msvcrt.dll__spawnvp]
mov dword [ebp - 0x164], 0
mov dword [esp], 0
mov dword [ebp - 0x1a8], eax
call eax
mov dword [esp + 4], 0x632
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [sym.imp.msvcrt.dll__tell]
mov dword [esp], esi
mov dword [ebp - 0x19c], eax
call eax
mov dword [esp], esi
mov edi, eax
mov eax, dword [ebp - 0x19c]
call eax
mov dword [esp + 8], edi
cmp eax, 8
mov dword [esp + 4], str.bad_position__lu_expecting_8_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 8], 0
mov dword [esp + 4], 0
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll__lseek]
mov dword [esp + 4], 0x634
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov eax, dword [sym.imp.msvcrt.dll__read]
mov dword [esp + 8], 0x10
mov dword [esp + 4], ebx
mov dword [esp], esi
mov dword [ebp - 0x1a4], eax
call eax
xor edx, edx
cmp eax, 8
je 0x40b7b0
mov dword [esp], edx
mov dword [esp + 4], str.Couldnt_read_back_the_data_n
call fcn.0044cad0
mov edx, dword [sym.imp.msvcrt.dll__close]
mov dword [esp], esi
mov dword [ebp - 0x1b0], edx
call edx
mov dword [esp + 4], 0x636
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov edi, dword [sym.imp.msvcrt.dll__unlink]
mov dword [esp], str.fdopen.tst
call edi
mov dword [esp + 4], str.Couldnt_unlink_n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 8], 0x180
mov eax, dword [ebp - 0x1ac]
mov dword [esp + 4], 0x8182
mov dword [esp], str.fdopen.tst
call eax
mov dword [esp + 4], 0x639
mov dword [esp], 0x45a2c0
mov esi, eax
call fcn.0044c860
xor eax, eax
cmp esi, 0xffffffff
mov dword [esp + 4], str.Couldnt_create_test_file_n
setne al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 8], esi
mov dword [esp], ebx
mov dword [esp + 4], 0x45a517
mov dword [ebp - 0x168], ebx
mov dword [ebp - 0x170], 0x45a50a
mov dword [ebp - 0x16c], str.inherit_no
call fcn.0040aaa0
lea eax, [ebp - 0x174]
mov edx, dword [ebp - 0x1a8]
mov dword [ebp - 0x164], 0
mov dword [esp + 8], eax
mov eax, dword [ebp - 0x1a0]
mov dword [esp], 0
mov dword [esp + 4], eax
call edx
mov dword [esp + 4], 0x63f
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], esi
mov ecx, dword [ebp - 0x19c]
call ecx
mov dword [esp], esi
mov ecx, dword [ebp - 0x19c]
mov dword [ebp - 0x1a8], eax
call ecx
mov ecx, dword [ebp - 0x1a8]
mov dword [esp + 4], str.bad_position__lu_expecting_0_n
test eax, eax
sete al
mov dword [esp + 8], ecx
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov dword [esp + 4], 0x640
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov ecx, dword [ebp - 0x1a4]
mov dword [esp], esi
mov dword [esp + 4], ebx
mov dword [esp + 8], 0x10
call ecx
mov dword [esp + 8], ebx
lea ebx, [ebp - 0x11c]
test eax, eax
mov dword [esp + 4], str.Found_unexpected_data___s__n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov edx, dword [ebp - 0x1b0]
mov dword [esp], esi
lea esi, [ebp - 0x160]
call edx
mov dword [esp + 4], 0x642
mov dword [esp], 0x45a2c0
call fcn.0044c860
mov dword [esp], str.fdopen.tst
call edi
mov dword [esp + 4], str.Couldnt_unlink_n
test eax, eax
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0044cad0
mov eax, dword [ebp - 0x1a0]
mov dword [esp], ebx
mov dword [esp + 4], str._s_file_inherit_1
mov dword [esp + 8], eax
mov dword [ebp - 0x190], 0xc
mov dword [ebp - 0x18c], 0
mov dword [ebp - 0x188], 1
call fcn.0040aaa0
lea edx, [ebp - 0x15c]
xor eax, eax
mov ecx, 0x10
mov dword [ebp - 0x160], 0x44
mov edi, edx
mov edx, ebx
rep stosd dword es:[edi], eax
mov eax, 4
mov dword [esp + 4], str.empty_block
mov dword [esp], 0
mov word [ebp - 0x12e], ax
mov eax, esi
mov dword [ebp - 0x12c], 0x46d3a0
mov dword [0x46d3a0], 0
call fcn.0040ab50
mov esi, dword [sym.imp.kernel32.dll_GetStdHandle]
mov dword [esp], 0xfffffff6
call esi
mov ecx, dword [sym.imp.kernel32.dll_CreateFileA]
lea edx, [ebp - 0x190]
sub esp, 4
mov dword [ebp - 0x19c], eax
mov dword [ebp - 0x1a4], ecx
mov dword [esp + 0xc], edx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.fdopen.tst
call ecx
sub esp, 0x1c
mov edi, eax
mov dword [esp], 0xfffffff4
call esi
mov edx, 0x13
mov ecx, 0xffff8181
mov dword [ebp - 0x12c], 0x46d3a0
sub esp, 4
mov esi, eax
mov eax, dword [ebp - 0x19c]
mov word [ebp - 0x12e], dx
mov dword [esp + 4], str.valid_block
mov edx, ebx
mov dword [esp], 1
mov dword [0x46d3a7], eax
lea eax, [ebp - 0x160]
mov word [0x46d3a4], cx
mov ecx, edi
mov dword [0x46d3ab], edi
mov dword [0x46d3af], esi
mov dword [0x46d3a0], 3
mov byte [0x46d3a6], 0x81
call fcn.0040ab50
mov edx, dword [sym.imp.kernel32.dll_CloseHandle]
mov dword [esp], edi
mov dword [ebp - 0x1a8], edx
call edx
mov edi, dword [sym.imp.kernel32.dll_DeleteFileA]
sub esp, 4
mov dword [ebp - 0x1ac], edi
mov dword [esp], str.fdopen.tst
call edi
lea edi, [ebp - 0x190]
mov ecx, dword [ebp - 0x1a4]
sub esp, 4
mov dword [esp + 0xc], edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.fdopen.tst
call ecx
mov edx, ebx
mov dword [ebp - 0x12c], 0x46d3a0
mov edi, eax
mov eax, 0x13
sub esp, 0x1c
mov dword [0x46d3af], esi
mov word [ebp - 0x12e], ax
mov eax, dword [ebp - 0x19c]
mov ecx, edi
mov dword [esp + 4], str.zero_count_block
mov dword [esp], 0
mov dword [0x46d3a7], eax
mov eax, 0xffff8181
mov word [0x46d3a4], ax
lea eax, [ebp - 0x160]
mov dword [0x46d3ab], edi
mov dword [0x46d3a0], 0
mov byte [0x46d3a6], 0x81
call fcn.0040ab50
mov edx, dword [ebp - 0x1a8]
mov dword [esp], edi
call edx
mov edi, dword [ebp - 0x1ac]
sub esp, 4
mov dword [esp], str.fdopen.tst
call edi
lea edi, [ebp - 0x190]
mov ecx, dword [ebp - 0x1a4]
sub esp, 4
mov dword [esp + 0xc], edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.fdopen.tst
call ecx
mov edx, ebx
mov dword [ebp - 0x12c], 0x46d3a0
mov edi, eax
sub esp, 0x1c
mov eax, dword [ebp - 0x19c]
mov dword [0x46d3af], esi
mov dword [esp + 4], str.small_size_block
mov ecx, edi
mov dword [0x46d3a7], eax
mov eax, 0xffff8181
mov dword [esp], 1
mov word [0x46d3a4], ax
mov eax, 0x10
mov word [ebp - 0x12e], ax
lea eax, [ebp - 0x160]
mov dword [0x46d3ab], edi
mov dword [0x46d3a0], 3
mov byte [0x46d3a6], 0x81
call fcn.0040ab50
mov edx, dword [ebp - 0x1a8]
mov dword [esp], edi
call edx
mov edi, dword [ebp - 0x1ac]
sub esp, 4
mov dword [esp], str.fdopen.tst
call edi
lea edi, [ebp - 0x190]
mov ecx, dword [ebp - 0x1a4]
sub esp, 4
mov dword [esp + 0xc], edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.fdopen.tst
call ecx
mov edx, ebx
mov dword [ebp - 0x12c], 0x46d3a0
mov edi, eax
sub esp, 0x1c
mov eax, dword [ebp - 0x19c]
mov dword [0x46d3af], esi
mov dword [esp + 4], str.smaller_size_block
mov ecx, edi
mov dword [0x46d3a7], eax
mov eax, 0xffff8181
mov dword [esp], 0
mov word [0x46d3a4], ax
mov eax, 9
mov word [ebp - 0x12e], ax
lea eax, [ebp - 0x160]
mov dword [0x46d3ab], edi
mov dword [0x46d3a0], 3
mov byte [0x46d3a6], 0x81
call fcn.0040ab50
mov edx, dword [ebp - 0x1a8]
mov dword [esp], edi
call edx
mov edi, dword [ebp - 0x1ac]
sub esp, 4
mov dword [esp], str.fdopen.tst
call edi
lea edi, [ebp - 0x190]
mov ecx, dword [ebp - 0x1a4]
sub esp, 4
mov dword [esp + 0xc], edi
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 8], 3
mov dword [esp + 4], 0xc0000000
mov dword [esp], str.fdopen.tst
call ecx
mov edx, 0xffff8181
mov ecx, 0x1a
mov dword [ebp - 0x12c], 0x46d3a0
sub esp, 0x1c
mov edi, eax
mov eax, dword [ebp - 0x19c]
mov word [ebp - 0x12e], cx
mov dword [esp + 4], str.large_size_block
mov ecx, edi
mov dword [esp], 1
mov dword [0x46d3a7], eax
lea eax, [ebp - 0x160]
mov word [0x46d3a4], dx
mov edx, ebx
mov dword [0x46d3ab], edi
mov dword [0x46d3af], esi
mov dword [0x46d3a0], 3
mov byte [0x46d3a6], 0x81
call fcn.0040ab50
mov edx, dword [ebp - 0x1a8]
mov dword [esp], edi
mov edi, 0x13
call edx
mov ecx, dword [ebp - 0x1ac]
sub esp, 4
mov dword [esp], str.fdopen.tst
call ecx
mov eax, 0xffff8181
mov word [ebp - 0x12e], di
mov edi, dword [ebp - 0x19c]
mov word [0x46d3a4], ax
mov eax, dword [ebp - 0x1a0]
sub esp, 4
mov dword [esp], ebx
mov dword [esp + 0xc], 0xffffffff
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_file_inherit_1__p
mov dword [ebp - 0x12c], 0x46d3a0
mov dword [0x46d3a7], edi
mov dword [0x46d3af], esi
mov dword [0x46d3ab], 0xffffffff
mov dword [0x46d3a0], 3
mov byte [0x46d3a6], 0x81
call fcn.0040aaa0
mov dword [esp], 0
mov edx, ebx
xor ecx, ecx
mov dword [esp + 4], str.INVALID_HANDLE_VALUE_stdout_handle
lea eax, [ebp - 0x160]
call fcn.0040ab50
mov eax, 0x13
mov dword [esp], ebx
mov word [ebp - 0x12e], ax
mov eax, 0xffff8181
mov word [0x46d3a4], ax
mov eax, dword [ebp - 0x1a0]
mov dword [esp + 0xc], 0
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_file_inherit_1__p
mov dword [ebp - 0x12c], 0x46d3a0
mov dword [0x46d3a7], edi
mov dword [0x46d3af], esi
mov dword [0x46d3ab], 0
mov dword [0x46d3a0], 3
mov byte [0x46d3a6], 0x81
call fcn.0040aaa0
mov dword [esp], 0
mov edx, ebx
xor ecx, ecx
mov dword [esp + 4], str.NULL_stdout_handle
lea eax, [ebp - 0x160]
call fcn.0040ab50
mov eax, 0x13
mov dword [esp], ebx
mov word [ebp - 0x12e], ax
mov eax, 0xffff8181
mov word [0x46d3a4], ax
mov eax, dword [ebp - 0x1a0]
mov dword [esp + 0xc], 0xdeadbeef
mov dword [esp + 8], eax
mov dword [esp + 4], str._s_file_inherit_1__p
mov dword [ebp - 0x12c], 0x46d3a0
mov dword [0x46d3a7], edi
mov dword [0x46d3af], esi
mov dword [0x46d3ab], 0xdeadbeef
mov dword [0x46d3a0], 3
mov byte [0x46d3a6], 0x81
call fcn.0040aaa0
mov dword [esp], 0
mov edx, ebx
xor ecx, ecx
mov dword [esp + 4], str.invalid_stdout_handle
lea eax, [ebp - 0x160]
call fcn.0040ab50
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
cmp dword [ebp - 0x184], 0x63637553
je 0x40b7d0
mov edx, 1
xor edx, 1
jmp 0x40af55
cmp dword [ebx + 4], 0x737365
jne 0x40b7bc
jmp 0x40b7c1