Function at 0x460170
Capabilities:
Delete file
Inspect section memory permissions

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x6c
call fcn.0045b4c0
mov dword [ebp - 0x4c], 0
test eax, eax
je 0x460c1e
mov eax, dword [ebp - 0x4c]
xor esi, esi
mov edi, dword fs:[0x18]
mov eax, dword [eax*8 + 0x59df40]
mov dword [ebp - 0x5c], edi
mov ebx, esi
mov esi, eax
mov eax, dword [ebp - 0x5c]
mov edi, dword [ebx*8 + 0x59e0e0]
mov dword [eax + 0x34], 0xdeadbeef
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], edi
mov dword [esp + 4], esi
mov dword [esp], 0x76d020
call dword [sym.imp.kernel32.dll_CreateFileA]
mov dword [ebp - 0x50], eax
sub esp, 0x1c
cmp eax, 0xffffffff
je 0x460be6
mov eax, esi
mov dword [ebp - 0x54], ebx
or eax, 0x120089
test esi, esi
mov dword [ebp - 0x58], esi
cmovns eax, esi
mov ecx, eax
or ecx, 0x120116
test eax, 0x40000000
cmove ecx, eax
mov eax, ecx
or eax, 0x1200a0
test ecx, 0x20000000
cmove eax, ecx
mov ecx, eax
or ecx, 0x1f01ff
test eax, 0x10000000
cmovne eax, ecx
mov ecx, 7
test eax, 0x10027
cmovne ecx, edi
mov edi, eax
and edi, 0x21
mov dword [ebp - 0x34], edi
mov edi, eax
and eax, 0x10000
mov edx, ecx
mov dword [ebp - 0x48], eax
mov eax, ecx
and edx, 4
and edi, 6
and eax, 1
mov dword [ebp - 0x44], edx
mov dword [ebp - 0x3c], eax
mov eax, ecx
mov ecx, dword [ebx*8 + 0x59e0e4]
and eax, 2
mov dword [ebp - 0x38], edi
xor edi, edi
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 0x4c]
mov dword [ebp - 0x40], eax
xor eax, eax
mov ecx, dword [ecx*8 + 0x59df44]
mov dword [ebp - 0x20], ecx
mov ecx, dword fs:[0x18]
mov dword [ebp - 0x10], ecx
mov edx, eax
mov dword [ebp - 0x1c], eax
or edx, 0x120089
test eax, eax
cmovns edx, eax
mov ecx, edx
or ecx, 0x120116
test edx, 0x40000000
cmove ecx, edx
mov edx, ecx
or edx, 0x1200a0
test ecx, 0x20000000
cmove edx, ecx
mov ecx, edx
or ecx, 0x1f01ff
test edx, 0x10000000
cmovne edx, ecx
mov esi, edx
and esi, 0x10027
mov dword [ebp - 0x18], esi
mov esi, edx
and esi, 0x21
mov dword [ebp - 0x28], esi
mov esi, edx
and edx, 0x10000
and esi, 6
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x2c], esi
xor esi, esi
jmp 0x4603c6
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 0x14]
test eax, eax
je 0x4604e8
test cl, 1
jne 0x4604e8
mov dword [ebp - 0x14], edx
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xa1b
mov eax, dword [esi*8 + 0x59e0e4]
mov dword [esp + 0x14], eax
mov eax, dword [edi*8 + 0x59df44]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], str.open_succeeded_for_modes__s____s____s____s_n
mov dword [esp + 8], eax
xor eax, eax
cmp ebx, 0xffffffff
sete al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov edx, dword [ebp - 0x14]
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xa1f
xor eax, eax
cmp edx, 0x20
sete al
mov dword [esp + 8], edx
mov dword [esp + 4], str.wrong_error_code__d_n
mov dword [esp], eax
call fcn.0045bef0
cmp ebx, 0xffffffff
je 0x4603ba
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
add esi, 1
cmp esi, 8
je 0x460518
mov eax, dword [ebp - 0x10]
mov ecx, dword [esi*8 + 0x59e0e0]
mov dword [eax + 0x34], 0xdeadbeef
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], ecx
mov ebx, dword [ebp - 0x1c]
mov dword [ebp - 0x14], ecx
mov dword [esp + 4], ebx
mov dword [esp], 0x76d020
call dword [sym.imp.kernel32.dll_CreateFileA]
mov ebx, eax
mov eax, dword [ebp - 0x10]
sub esp, 0x1c
mov edx, dword [eax + 0x34]
mov eax, dword [ebp - 0x18]
test eax, eax
jne 0x460310
mov ecx, dword [ebp - 0x28]
test ecx, ecx
je 0x46043a
mov eax, dword [ebp - 0x3c]
test eax, eax
je 0x460327
mov eax, dword [ebp - 0x2c]
test eax, eax
je 0x46044c
mov eax, dword [ebp - 0x40]
test eax, eax
je 0x460327
mov eax, dword [ebp - 0x30]
test eax, eax
je 0x46045e
mov eax, dword [ebp - 0x44]
test eax, eax
je 0x460327
mov dword [ebp - 0x14], edx
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xa13
mov eax, dword [esi*8 + 0x59e0e4]
mov dword [esp + 0x14], eax
mov eax, dword [edi*8 + 0x59df44]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x24]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], str.open_failed_for_modes__s____s____s____s_n
mov dword [esp + 8], eax
xor eax, eax
cmp ebx, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov edx, dword [ebp - 0x14]
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xa17
xor eax, eax
test edx, edx
sete al
mov dword [esp + 8], edx
mov dword [esp + 4], str.wrong_error_code__d_n
mov dword [esp], eax
call fcn.0045bef0
jmp 0x4603a9
mov eax, dword [ebp - 0x38]
test eax, eax
je 0x4604f8
test cl, 2
je 0x460327
mov eax, dword [ebp - 0x48]
test eax, eax
je 0x460428
and ecx, 4
je 0x460327
jmp 0x460428
add edi, 1
cmp edi, 0x18
je 0x46052c
mov eax, dword [edi*8 + 0x59df40]
jmp 0x4602a0
mov ebx, dword [ebp - 0x54]
mov eax, dword [ebp - 0x50]
mov esi, dword [ebp - 0x58]
add ebx, 1
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
cmp ebx, 8
jne 0x4601a7
add dword [ebp - 0x4c], 1
mov eax, dword [ebp - 0x4c]
cmp eax, 0x18
jne 0x46018d
mov dword [ebp - 0x2c], 0
call fcn.0045b4c0
mov eax, dword fs:[0x18]
mov dword [ebp - 0x18], eax
mov dword [eax + 0x34], 0xdeadbeef
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 0xc0000000
mov dword [esp], 0x76d020
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov ebx, eax
cmp eax, 0xffffffff
je 0x460d75
mov eax, dword [ebp - 0x2c]
mov esi, dword [eax*8 + 0x59dd40]
mov dword [ebp - 0x1c], esi
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], esi
mov dword [esp + 4], 0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CreateFileMappingA]
sub esp, 0x18
mov edi, eax
mov eax, 0xa36
call fcn.0045b740
mov eax, dword [ebp - 0x2c]
mov ecx, dword [eax*8 + 0x59dd44]
mov eax, dword [ebp - 0x18]
mov eax, dword [eax + 0x34]
mov dword [ebp - 0x20], ecx
mov dword [esp + 8], ecx
mov dword [esp + 0xc], eax
xor eax, eax
test edi, edi
setne al
mov dword [esp + 4], str.failed_to_create_mapping__s_err__lu_n
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
test edi, edi
je 0x460a33
and esi, 0x1000000
mov dword [ebp - 0x28], 0
mov dword [ebp - 0x24], esi
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x38], edi
xor esi, esi
mov ebx, dword [eax*8 + 0x59df40]
mov edi, ebx
jmp 0x460732
test bl, bl
je 0x46068d
and ecx, 2
je 0x460c30
mov eax, edi
or eax, 0x120089
test edi, edi
cmovns eax, edi
mov ecx, eax
or ecx, 0x120116
test eax, 0x40000000
cmovne eax, ecx
mov ecx, eax
or ecx, 0x1200a0
test eax, 0x20000000
cmovne eax, ecx
mov ecx, eax
or ecx, 0x1f01ff
test eax, 0x10000000
cmovne eax, ecx
mov ecx, dword [ebp - 0x24]
test ecx, ecx
je 0x4606d8
test al, 2
jne 0x460c30
mov dword [ebp - 0x10], edx
call fcn.0057d110
mov edx, dword [ebp - 0x10]
mov dword [eax], 0x597dfd
cmp edx, 0xdeadbeef
mov dword [eax + 4], 0xa51
sete al
test edx, edx
mov dword [esp + 8], edx
sete dl
mov dword [esp + 4], str.wrong_error_code__d_n
add esi, 1
or eax, edx
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov eax, dword [ebp - 0x14]
mov dword [esp], eax
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
cmp esi, 8
je 0x460896
mov ebx, dword [ebp - 0x18]
mov ecx, dword [esi*8 + 0x59e0e0]
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 8], ecx
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [ebp - 0x10], ecx
mov dword [esp + 4], edi
mov dword [esp], 0x76d020
call dword [sym.imp.kernel32.dll_CreateFileA]
mov edx, dword [ebx + 0x34]
mov ebx, dword [ebp - 0x1c]
sub esp, 0x1c
mov ecx, eax
mov dword [ebp - 0x14], eax
cmp ebx, 0x40
sete al
cmp ebx, 4
sete bl
or ebx, eax
cmp ecx, 0xffffffff
mov ecx, dword [ebp - 0x10]
jne 0x460680
mov dword [ebp - 0x30], edx
mov dword [ebp - 0x34], ecx
call fcn.0057d110
test bl, bl
mov edx, dword [ebp - 0x30]
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xa45
mov eax, dword [esi*8 + 0x59e0e4]
mov dword [ebp - 0x10], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax*8 + 0x59df44]
mov dword [ebp - 0x14], eax
je 0x4607e6
mov ecx, dword [ebp - 0x34]
mov eax, 1
and ecx, 2
je 0x460831
mov eax, edi
or eax, 0x120089
test edi, edi
cmovns eax, edi
mov ecx, eax
or ecx, 0x120116
test eax, 0x40000000
cmovne eax, ecx
mov ecx, eax
or ecx, 0x1200a0
test eax, 0x20000000
cmovne eax, ecx
mov ecx, eax
or ecx, 0x1f01ff
test eax, 0x10000000
cmovne eax, ecx
mov ecx, dword [ebp - 0x24]
xor ebx, ebx
shr eax, 1
and eax, 1
test ecx, ecx
cmove eax, ebx
mov ebx, dword [ebp - 0x10]
mov dword [ebp - 0x30], edx
mov dword [esp + 0x10], ebx
mov ebx, dword [ebp - 0x14]
mov dword [esp + 0xc], ebx
mov ebx, dword [ebp - 0x20]
mov dword [esp], eax
mov dword [esp + 8], ebx
mov dword [esp + 4], str.open_failed_for_modes_map__s____s____s_n
call fcn.0045bef0
call fcn.0057d110
mov edx, dword [ebp - 0x30]
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xa48
xor eax, eax
cmp edx, 0x20
sete al
mov dword [esp + 8], edx
add esi, 1
mov dword [esp + 4], str.wrong_error_code__d_n
mov dword [esp], eax
call fcn.0045bef0
cmp esi, 8
jne 0x460732
add dword [ebp - 0x28], 1
mov eax, dword [ebp - 0x28]
mov edi, dword [ebp - 0x38]
cmp eax, 0x18
jne 0x460663
mov ebx, dword fs:[0x18]
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 2
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x40000000
mov dword [esp], 0x76d020
call dword [sym.imp.kernel32.dll_CreateFileA]
mov edx, dword [ebx + 0x34]
mov esi, eax
mov eax, dword [ebp - 0x24]
sub esp, 0x1c
mov dword [ebp - 0x10], edx
test eax, eax
je 0x460c8a
mov eax, 0xa60
call fcn.0045b740
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], str.create_succeeded_for_map__s_n
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xa61
call fcn.0045b740
mov eax, dword [ebp - 0x20]
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x10]
xor eax, eax
mov dword [esp + 4], str.wrong_error_code__d_for__s_n
cmp edx, 0x20
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.0045bef0
cmp esi, 0xffffffff
je 0x460974
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x4000000
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], 0x76d020
call dword [sym.imp.kernel32.dll_CreateFileA]
mov ebx, dword [ebx + 0x34]
sub esp, 0x1c
mov esi, eax
mov eax, 0xa71
call fcn.0045b740
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], str.create_succeeded_for_map__s_n
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xa72
call fcn.0045b740
mov eax, dword [ebp - 0x20]
mov dword [esp + 8], ebx
mov dword [esp + 4], str.wrong_error_code__d_for__s_n
mov dword [esp + 0xc], eax
xor eax, eax
cmp ebx, 5
sete al
mov dword [esp], eax
call fcn.0045bef0
cmp esi, 0xffffffff
je 0x460a27
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [esp], edi
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
add dword [ebp - 0x2c], 1
mov eax, dword [ebp - 0x2c]
cmp eax, 4
jne 0x460564
mov edi, dword fs:[0x18]
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 4
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0xc0000000
mov dword [esp], 0x76d020
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov ebx, eax
mov eax, 0xa7f
call fcn.0045b740
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.CreateFileA_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp ebx, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
mov dword [edi + 0x34], 0xdeadbeef
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
mov dword [esp], 0x76d020
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov esi, eax
mov eax, 0xa83
call fcn.0045b740
xor eax, eax
cmp esi, 0xffffffff
mov dword [esp + 4], str.CreateFileA_should_fail_n
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xa84
call fcn.0045b740
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.wrong_error_code__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 0x20
sete al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], 0x76d020
call dword [sym.imp.kernel32.dll_CreateFileA]
sub esp, 0x1c
mov esi, eax
mov eax, 0xa87
call fcn.0045b740
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.CreateFileA_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [esp], 0x76d020
call dword [sym.imp.kernel32.dll_DeleteFileA]
sub esp, 4
jmp 0x460c16
mov eax, 0xa05
call fcn.0045b740
mov eax, dword [ebp - 0x5c]
mov eax, dword [eax + 0x34]
mov dword [esp + 8], 0x76d020
mov dword [esp + 4], str.couldnt_create_file___s___err_ld__n
mov dword [esp + 0xc], eax
mov dword [esp], 0
call fcn.0045bef0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x9f8
call fcn.0045b740
mov eax, dword fs:[0x18]
jmp 0x460bf3
mov dword [ebp - 0x10], edx
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xa4e
mov eax, dword [esi*8 + 0x59e0e4]
mov dword [esp + 0x10], eax
mov eax, dword [ebp - 0x28]
mov eax, dword [eax*8 + 0x59df44]
mov dword [esp + 0xc], eax
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], str.open_succeeded_for_modes_map__s____s____s_n
mov dword [esp + 8], eax
mov edx, dword [0x8f0770]
xor eax, eax
test edx, edx
sete al
mov dword [esp], eax
call fcn.0045bef0
mov edx, dword [ebp - 0x10]
jmp 0x4606d8
mov eax, 0xa65
call fcn.0045b740
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], str.create_succeeded_for_map__s_n
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xa66
call fcn.0045b740
mov eax, dword [ebp - 0x20]
mov dword [esp + 0xc], eax
mov edx, dword [ebp - 0x10]
xor eax, eax
mov dword [esp + 4], str.wrong_error_code__d_for__s_n
cmp edx, 0x4c8
mov dword [esp + 8], edx
sete al
mov dword [esp], eax
call fcn.0045bef0
cmp esi, 0xffffffff
je 0x460cf7
mov dword [esp], esi
call dword [sym.imp.kernel32.dll_CloseHandle]
sub esp, 4
mov dword [ebx + 0x34], 0xdeadbeef
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], 0x4000000
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 3
mov dword [esp + 4], 0x80000000
mov dword [esp], 0x76d020
call dword [sym.imp.kernel32.dll_CreateFileA]
mov ebx, dword [ebx + 0x34]
sub esp, 0x1c
mov esi, eax
mov eax, 0xa76
call fcn.0045b740
mov dword [esp + 0xc], ebx
mov eax, dword [ebp - 0x20]
mov dword [esp + 4], str.open_failed_for_map__s_err__u_n
mov dword [esp + 8], eax
xor eax, eax
cmp esi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
jmp 0x460a16
mov eax, 0xa32
call fcn.0045b740
mov eax, dword [ebp - 0x18]
jmp 0x460bf3