Function at 0x4697f0
Capabilities:
Delete file

Disassembly:
push ebp
mov eax, 0x272c
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 0x469bb0
mov ebx, eax
call fcn.0057d110
mov esi, dword [sym.imp.kernel32.dll__hwrite]
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x20a
mov dword [esp], ebx
mov dword [esp + 8], 0x2b8
mov dword [esp + 4], str.en_larvig_liten_text_dx_e_gx_hej_84_hej_4484__
call esi
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], 0x20b
mov dword [esp], ebx
mov dword [ebp - 0x2720], 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 edx, dword [sym.imp.kernel32.dll__lopen]
mov dword [esp + 4], 0
mov dword [esp], 0x76d020
mov dword [ebp - 0x2728], edx
call edx
sub esp, 8
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x20e
mov dword [esp], ebx
mov dword [esp + 8], 0x2b8
mov dword [esp + 4], str.en_larvig_liten_text_dx_e_gx_hej_84_hej_4484__
call esi
sub esp, 0xc
cmp eax, 0xffffffff
sete al
mov dword [esp + 4], str._hwrite_shouldnt_be_able_to_write__n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov eax, dword [sym.imp.kernel32.dll__hread]
mov dword [esp], ebx
lea ecx, [ebp - 0x271c]
mov dword [esp + 4], ecx
mov dword [esp + 8], 0x2b8
mov dword [ebp - 0x2724], eax
call eax
sub esp, 0xc
mov edi, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x210
xor eax, eax
cmp edi, 0x2b8
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], 0x211
mov dword [esp], ebx
mov edi, dword [ebp - 0x2720]
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 edx, dword [ebp - 0x2728]
call edx
lea ecx, [ebp - 0x271c]
sub esp, 8
mov edi, eax
mov dword [esp + 4], ecx
mov dword [esp + 8], 0x570
mov dword [esp], eax
mov eax, dword [ebp - 0x2724]
call eax
sub esp, 0xc
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x215
xor eax, eax
cmp ebx, 0x2b8
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], 0x216
mov dword [esp], edi
mov dword [esp + 8], 0x2b8
mov dword [esp + 4], str.en_larvig_liten_text_dx_e_gx_hej_84_hej_4484__
call esi
sub esp, 0xc
cmp eax, 0xffffffff
setne al
mov dword [esp + 4], str._hwrite_should_write_just_fine_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x217
mov dword [esp], edi
mov edi, dword [ebp - 0x2720]
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], 1
mov dword [esp], 0x76d020
mov edx, dword [ebp - 0x2728]
call edx
sub esp, 8
mov ebx, eax
call fcn.0057d110
lea ecx, [ebp - 0x271c]
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x21a
mov dword [esp + 4], ecx
mov dword [esp], ebx
mov dword [esp + 8], 1
mov eax, dword [ebp - 0x2724]
call eax
sub esp, 0xc
cmp eax, 0xffffffff
sete al
mov dword [esp + 4], str.you_should_only_be_able_to_write_this_file_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x21b
mov dword [esp], ebx
mov dword [esp + 8], 0x2b8
mov dword [esp + 4], str.en_larvig_liten_text_dx_e_gx_hej_84_hej_4484__
call esi
sub esp, 0xc
cmp eax, 0xffffffff
setne al
mov dword [esp + 4], str._hwrite_should_write_just_fine_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x21c
mov dword [esp], ebx
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], 0x76d020
call dword [sym.imp.kernel32.dll_DeleteFileA]
sub esp, 4
mov ebx, eax
call fcn.0057d110
mov dword [eax], 0x597dfd
mov dword [eax + 4], 0x21f
mov eax, dword fs:[0x18]
mov eax, dword [eax + 0x34]
mov dword [esp], ebx
mov dword [esp + 4], str.DeleteFile_failed___ld__n
mov dword [esp + 8], eax
call fcn.0045bef0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov eax, 0x206
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