Function at 0x46b5e0
Capabilities:
Delete file

Disassembly:
push ebp
mov eax, 0x273c
mov ebp, esp
push edi
push esi
push ebx
call fcn.0057e5f0
sub esp, eax
mov dword [esp + 4], 0
mov dword [esp], 0x76d020
call dword [sym.imp.kernel32.dll__lcreat]
sub esp, 8
cmp eax, 0xffffffff
je 0x46baa2
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xbb
mov eax, dword [sym.imp.kernel32.dll__hwrite]
mov dword [esp], ebx
mov dword [esp + 8], 0
mov dword [esp + 4], 0x597da0
mov dword [ebp - 0x2728], eax
call eax
sub esp, 0xc
cmp eax, 0xffffffff
setne al
mov dword [esp + 4], str._hwrite_complains_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov edi, dword [sym.imp.kernel32.dll__lclose]
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xbd
mov dword [esp], ebx
mov dword [ebp - 0x2734], edi
call edi
sub esp, 4
cmp eax, 0xffffffff
setne al
mov dword [esp + 4], str._lclose_complains_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov eax, dword [sym.imp.kernel32.dll__lopen]
mov dword [esp + 4], 0
mov dword [esp], 0x76d020
mov dword [ebp - 0x2730], eax
call eax
mov ecx, dword [sym.imp.kernel32.dll__hread]
lea edx, [ebp - 0x271c]
sub esp, 8
mov ebx, eax
mov dword [esp + 4], edx
mov dword [esp + 8], 1
mov dword [esp], eax
mov dword [ebp - 0x2738], ecx
call ecx
sub esp, 0xc
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xc3
xor eax, eax
test esi, esi
sete al
mov dword [esp + 4], str.file_read_size_error_n
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xc5
mov dword [esp], ebx
lea ebx, [ebp - 0xc]
call edi
sub esp, 4
cmp eax, 0xffffffff
setne al
mov dword [esp + 4], str._lclose_complains_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 4], 2
mov dword [esp], 0x76d020
mov eax, dword [ebp - 0x2730]
call eax
mov byte [ebp - 0x271d], 0
sub esp, 8
mov dword [ebp - 0x2724], eax
mov dword [esp], 0
call dword [sym.imp.msvcrt.dll_time]
mov dword [esp], eax
call dword [sym.imp.msvcrt.dll_srand]
mov esi, dword [sym.imp.msvcrt.dll_rand]
mov dword [ebp - 0x272c], 0x64
lea esi, [esi]
nop
lea edi, [ebp - 0x271c]
lea esi, [esi]
lea esi, [esi]
call esi
add edi, 1
add byte [ebp - 0x271d], al
mov byte [edi - 1], al
cmp ebx, edi
jne 0x46b7b0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xd3
lea eax, [ebp - 0x271c]
mov dword [esp + 8], 0x2710
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x2724]
mov dword [esp], eax
mov eax, dword [ebp - 0x2728]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
setne al
mov dword [esp + 4], str._hwrite_complains_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
sub dword [ebp - 0x272c], 1
jne 0x46b7a0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xd7
lea eax, [ebp - 0x271d]
mov dword [esp + 8], 1
mov dword [esp + 4], eax
mov esi, dword [ebp - 0x2724]
mov dword [esp], esi
mov eax, dword [ebp - 0x2728]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
setne al
mov dword [esp + 4], str._hwrite_complains_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xda
mov dword [esp], esi
mov eax, dword [ebp - 0x2734]
call eax
sub esp, 4
cmp eax, 0xffffffff
setne al
mov dword [esp + 4], str._lclose_complains_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 4], 0xf4241
mov dword [esp], 0x40
call dword [sym.imp.kernel32.dll_LocalAlloc]
sub esp, 8
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xde
xor eax, eax
test ebx, ebx
setne al
mov dword [esp + 4], str.LocalAlloc_fails.__Could_be_out_of_memory.__n
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], ebx
mov edi, dword [sym.imp.kernel32.dll_LocalLock]
call edi
sub esp, 4
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xe1
xor eax, eax
test esi, esi
setne al
mov dword [esp + 4], str.LocalLock_whines_n
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp + 4], 0
mov dword [esp], 0x76d020
mov eax, dword [ebp - 0x2730]
call eax
sub esp, 8
mov esi, eax
mov dword [esp], ebx
call edi
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xe6
xor eax, eax
test ebx, ebx
setne al
mov dword [esp + 4], str.LocalLock_whines_n
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xe8
mov dword [esp + 8], 0xf4241
mov dword [esp + 4], ebx
mov dword [esp], esi
mov eax, dword [ebp - 0x2738]
call eax
sub esp, 0xc
cmp eax, 0xf4241
sete al
mov dword [esp + 4], str.read_length_differ_from_write_length_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov byte [ebp - 0x271d], 0
mov eax, ebx
xor edx, edx
lea ecx, [ebx + 0xf4240]
add dl, byte [eax]
add eax, 1
mov byte [ebp - 0x271d], dl
cmp eax, ecx
jne 0x46b9c9
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xf3
mov dword [esp + 4], str.stored_checksum_differ_from_computed_checksum_n
movzx eax, byte [ebx + 0xf4240]
cmp byte [ebp - 0x271d], al
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xf5
mov dword [esp], esi
mov eax, dword [ebp - 0x2734]
call eax
sub esp, 4
cmp eax, 0xffffffff
setne al
mov dword [esp + 4], str._lclose_complains_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], 0x76d020
call dword [sym.imp.kernel32.dll_DeleteFileA]
sub esp, 4
mov esi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0xf8
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp + 4], str.DeleteFile_failed___ld__n
mov dword [esp + 8], eax
xor eax, eax
test esi, esi
setne al
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], ebx
call dword [sym.imp.kernel32.dll_LocalFree]
sub esp, 4
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0xb7
call fcn.0045b740
mov eax, dword fs:[0x18]
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