Function at 0x46e300
Capabilities:
Check if file exists
Get common file path
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
lea esi, [ebp - 0x520]
push ebx
sub esp, 0x640
mov eax, dword [0x76d16c]
mov dword [esp + 4], 0x104
mov dword [esp], esi
test eax, eax
je 0x46f228
call eax
sub esp, 8
add eax, 0xc
cmp eax, 0x103
jbe 0x46ee70
lea eax, [ebp - 0x5a8]
lea ebx, [ebp - 0x5a0]
mov dword [ebp - 0x62c], eax
mov eax, dword [sym.imp.kernel32.dll_OpenFile]
mov dword [ebp - 0x630], eax
mov eax, dword [sym.imp.kernel32.dll_lstrcmpiA]
mov dword [ebp - 0x634], eax
mov eax, 0xa5a5a5a5
mov ecx, 0x20
lea edi, [ebp - 0x628]
rep stosd dword es:[edi], eax
mov eax, dword [sym.imp.kernel32.dll_GetCurrentDirectoryA]
mov dword [esp + 4], esi
mov dword [esp], 0x104
mov dword [ebp - 0x638], eax
call eax
add eax, 0x12
sub esp, 8
cmp eax, 0x103
ja 0x46e55b
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll_strlen]
add eax, esi
cmp esi, eax
jb 0x46f030
mov edi, dword [ebp - 0x62c]
mov dword [eax], 0x2d6f6f66
mov ecx, 0x22
mov dword [eax + 4], 0x2d726162
mov dword [eax + 8], 0x2e6f6f66
mov dword [eax + 0xc], 0x7a6162
mov eax, 0xa5a5a5a5
rep stosd dword es:[edi], eax
mov edi, dword fs:[0x18]
mov dword [edi + 0x34], 0xfaceabee
mov dword [esp + 8], 0x4000
mov eax, dword [ebp - 0x62c]
mov dword [esp], str.._foo_bar_foo.baz
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x630]
call eax
sub esp, 0xc
mov dword [ebp - 0x63c], eax
mov eax, 0xe17
call fcn.0045b740
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.hFile___HFILE_ERROR_:__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [ebp - 0x63c], 0xffffffff
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe18
call fcn.0045b740
mov eax, dword [edi + 0x34]
mov dword [esp + 4], str.GetLastError___returns__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp dword [edi + 0x34], 2
sete al
mov dword [esp], eax
call fcn.0045bef0
mov edi, dword [0x8f0770]
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
xor ecx, ecx
test edi, edi
setne cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x46e4d6
call fcn.0057d110
mov dword [eax], 0x597dfd
movzx edx, byte [ebp - 0x5a8]
mov dword [eax + 4], 0xe1a
cmp dl, 0xa5
mov dword [esp + 8], edx
sete al
mov dword [esp + 4], str.OpenFile_set_ofs.cBytes_to__d_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x46e498
mov eax, 0xe1b
call fcn.0045b740
movzx edx, word [ebp - 0x5a6]
mov dword [esp + 4], str.OpenFile_set_ofs.nErrCode_to__d_n
cmp dx, 2
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe1c
call fcn.0045b740
mov dword [esp + 4], esi
mov dword [esp], ebx
mov eax, dword [ebp - 0x634]
call eax
mov edx, eax
sub esp, 8
mov eax, 1
test edx, edx
jne 0x46f000
mov dword [esp + 0xc], esi
mov dword [esp + 8], ebx
mov dword [esp + 4], str.OpenFile_returned__s__but_was_expected_to_return__s_or_string_filled_with_0xA5_n
mov dword [esp], eax
call fcn.0045bef0
lea esi, [ebp - 0x41c]
mov dword [esp], 0x104
mov dword [esp + 4], esi
mov eax, dword [ebp - 0x638]
call eax
add eax, 0xda
sub esp, 8
cmp eax, 0x38f
jbe 0x46f048
mov edi, dword [ebp - 0x62c]
mov eax, 0xa5a5a5a5
mov ecx, 0x22
rep stosd dword es:[edi], eax
mov edi, dword fs:[0x18]
mov dword [edi + 0x34], 0xfaceabee
mov dword [esp + 8], 0x1000
mov eax, dword [ebp - 0x62c]
mov dword [esp], 0x76d020
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x630]
call eax
sub esp, 0xc
mov esi, eax
mov eax, 0xe3c
call fcn.0045b740
xor eax, eax
cmp esi, 0xffffffff
mov dword [esp + 4], str.OpenFile_failed_to_create_nonexistent_file_n
setne al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe3d
call fcn.0045b740
mov edx, dword [edi + 0x34]
mov eax, 1
cmp edx, 0xfaceabee
je 0x46e610
xor eax, eax
test edx, edx
sete al
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.GetLastError___returns__ld_n
call fcn.0045bef0
mov eax, 0xe3f
call fcn.0045b740
movzx edx, byte [ebp - 0x5a8]
mov dword [esp + 4], str.OpenFile_set_ofs.cBytes_to__d_n
cmp dl, 0x88
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe40
call fcn.0045b740
movzx ecx, word [ebp - 0x5a6]
mov edx, 1
test cx, cx
je 0x46e679
mov eax, dword [0x8f0770]
xor edx, edx
test eax, eax
sete dl
mov dword [esp + 8], ecx
mov dword [esp], edx
mov dword [esp + 4], str.OpenFile_set_ofs.nErrCode_to__d_n
call fcn.0045bef0
mov dword [esp], esi
mov esi, dword [sym.imp.kernel32.dll__lclose]
call esi
sub esp, 4
mov edi, eax
mov eax, 0xe43
call fcn.0045b740
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str._lclose___returns__d_n
mov dword [esp], eax
call fcn.0045bef0
mov eax, dword [sym.imp.kernel32.dll_GetFileAttributesA]
mov dword [esp], 0x76d020
mov dword [ebp - 0x638], eax
call eax
sub esp, 4
mov edi, eax
mov eax, 0xe45
call fcn.0045b740
mov edx, dword fs:[0x18]
mov eax, dword [edx + 0x34]
mov dword [ebp - 0x63c], edx
mov dword [esp + 4], str.GetFileAttributesA:_error__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp edi, 0xffffffff
setne al
mov dword [esp], eax
call fcn.0045bef0
mov edx, dword [ebp - 0x63c]
mov edi, dword [ebp - 0x62c]
mov eax, 0xa5a5a5a5
mov ecx, 0x22
rep stosd dword es:[edi], eax
mov dword [edx + 0x34], 0xfaceabee
mov dword [esp + 8], 0
mov edi, dword [ebp - 0x62c]
mov dword [esp], 0x76d020
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x630]
call eax
sub esp, 0xc
mov edi, eax
mov eax, 0xe4c
call fcn.0045b740
xor eax, eax
cmp edi, 0xffffffff
mov dword [esp + 4], str.OpenFile_failed_on_read_n
setne al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe4d
call fcn.0045b740
mov edx, dword [ebp - 0x63c]
mov eax, 1
mov ecx, dword [edx + 0x34]
cmp ecx, 0xfaceabee
je 0x46e79f
xor eax, eax
test ecx, ecx
sete al
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], str.GetLastError___returns__ld_n
call fcn.0045bef0
mov eax, 0xe4f
call fcn.0045b740
movzx edx, byte [ebp - 0x5a8]
mov dword [esp + 4], str.OpenFile_set_ofs.cBytes_to__d_n
cmp dl, 0x88
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe50
call fcn.0045b740
movzx ecx, word [ebp - 0x5a6]
mov edx, 1
test cx, cx
je 0x46e808
mov eax, dword [0x8f0770]
xor edx, edx
test eax, eax
sete dl
mov dword [esp + 8], ecx
mov dword [esp], edx
mov dword [esp + 4], str.OpenFile_set_ofs.nErrCode_to__d_n
call fcn.0045bef0
mov eax, 0xe52
call fcn.0045b740
mov dword [esp + 4], 0x76d020
mov dword [esp], ebx
mov eax, dword [ebp - 0x634]
call eax
sub esp, 8
test eax, eax
sete al
mov dword [esp + 0xc], 0x76d020
movzx eax, al
mov dword [esp + 8], ebx
mov dword [esp + 4], str.OpenFile_returned__s__but_was_expected_to_return__s_n
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], edi
call esi
sub esp, 4
mov edi, eax
mov eax, 0xe55
call fcn.0045b740
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str._lclose___returns__d_n
mov dword [esp], eax
call fcn.0045bef0
mov edi, dword [ebp - 0x62c]
mov eax, 0xa5a5a5a5
mov ecx, 0x22
mov edx, dword fs:[0x18]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x63c], edx
mov dword [edx + 0x34], 0xfaceabee
mov dword [esp + 8], 1
mov edi, dword [ebp - 0x62c]
mov dword [esp], 0x76d020
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x630]
call eax
sub esp, 0xc
mov edi, eax
mov eax, 0xe5b
call fcn.0045b740
xor eax, eax
cmp edi, 0xffffffff
mov dword [esp + 4], str.OpenFile_failed_on_write_n
setne al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe5c
call fcn.0045b740
mov edx, dword [ebp - 0x63c]
mov eax, 1
mov ecx, dword [edx + 0x34]
cmp ecx, 0xfaceabee
je 0x46e924
xor eax, eax
test ecx, ecx
sete al
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], str.GetLastError___returns__ld_n
call fcn.0045bef0
mov eax, 0xe5e
call fcn.0045b740
movzx edx, byte [ebp - 0x5a8]
mov dword [esp + 4], str.OpenFile_set_ofs.cBytes_to__d_n
cmp dl, 0x88
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe5f
call fcn.0045b740
movzx ecx, word [ebp - 0x5a6]
mov edx, 1
test cx, cx
je 0x46e98d
mov eax, dword [0x8f0770]
xor edx, edx
test eax, eax
sete dl
mov dword [esp + 8], ecx
mov dword [esp], edx
mov dword [esp + 4], str.OpenFile_set_ofs.nErrCode_to__d_n
call fcn.0045bef0
mov eax, 0xe61
call fcn.0045b740
mov dword [esp + 4], 0x76d020
mov dword [esp], ebx
mov eax, dword [ebp - 0x634]
call eax
sub esp, 8
test eax, eax
sete al
mov dword [esp + 0xc], 0x76d020
movzx eax, al
mov dword [esp + 8], ebx
mov dword [esp + 4], str.OpenFile_returned__s__but_was_expected_to_return__s_n
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], edi
call esi
sub esp, 4
mov edi, eax
mov eax, 0xe64
call fcn.0045b740
xor eax, eax
test edi, edi
mov dword [esp + 8], edi
sete al
mov dword [esp + 4], str._lclose___returns__d_n
mov dword [esp], eax
call fcn.0045bef0
mov edi, dword [ebp - 0x62c]
mov eax, 0xa5a5a5a5
mov ecx, 0x22
mov edx, dword fs:[0x18]
rep stosd dword es:[edi], eax
mov dword [ebp - 0x63c], edx
mov dword [edx + 0x34], 0xfaceabee
mov dword [esp + 8], 2
mov edi, dword [ebp - 0x62c]
mov dword [esp], 0x76d020
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x630]
call eax
sub esp, 0xc
mov edi, eax
mov eax, 0xe6a
call fcn.0045b740
xor eax, eax
cmp edi, 0xffffffff
mov dword [esp + 4], str.OpenFile_failed_on_read_write_n
setne al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe6b
call fcn.0045b740
mov edx, dword [ebp - 0x63c]
mov eax, 1
mov ecx, dword [edx + 0x34]
cmp ecx, 0xfaceabee
je 0x46eaa9
xor eax, eax
test ecx, ecx
sete al
mov dword [esp + 8], ecx
mov dword [esp], eax
mov dword [esp + 4], str.GetLastError___returns__ld_n
call fcn.0045bef0
mov eax, 0xe6d
call fcn.0045b740
movzx edx, byte [ebp - 0x5a8]
mov dword [esp + 4], str.OpenFile_set_ofs.cBytes_to__d_n
cmp dl, 0x88
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe6e
call fcn.0045b740
movzx ecx, word [ebp - 0x5a6]
mov edx, 1
test cx, cx
je 0x46eb12
mov eax, dword [0x8f0770]
xor edx, edx
test eax, eax
sete dl
mov dword [esp], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], str.OpenFile_set_ofs.nErrCode_to__d_n
call fcn.0045bef0
mov eax, 0xe70
call fcn.0045b740
mov dword [esp + 4], 0x76d020
mov dword [esp], ebx
mov eax, dword [ebp - 0x634]
call eax
sub esp, 8
test eax, eax
sete al
mov dword [esp + 0xc], 0x76d020
movzx eax, al
mov dword [esp + 8], ebx
mov dword [esp + 4], str.OpenFile_returned__s__but_was_expected_to_return__s_n
mov dword [esp], eax
call fcn.0045bef0
mov dword [esp], edi
call esi
sub esp, 4
mov esi, eax
mov eax, 0xe73
call fcn.0045b740
xor eax, eax
test esi, esi
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str._lclose___returns__d_n
mov dword [esp], eax
call fcn.0045bef0
mov edi, dword [ebp - 0x62c]
mov eax, 0xa5a5a5a5
mov ecx, 0x22
rep stosd dword es:[edi], eax
mov edi, dword fs:[0x18]
mov dword [edi + 0x34], 0xfaceabee
mov dword [esp + 8], 0x4000
mov eax, dword [ebp - 0x62c]
mov dword [esp], 0x76d020
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x630]
call eax
sub esp, 0xc
mov esi, eax
mov eax, 0xe79
call fcn.0045b740
xor eax, eax
cmp esi, 1
mov dword [esp + 4], str.OpenFile_failed_on_finding_our_created_file_n
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe7a
call fcn.0045b740
mov edx, dword [edi + 0x34]
mov eax, 1
cmp edx, 0xfaceabee
je 0x46ec22
xor eax, eax
test edx, edx
sete al
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.GetLastError___returns__ld_n
call fcn.0045bef0
mov eax, 0xe7c
call fcn.0045b740
movzx edx, byte [ebp - 0x5a8]
mov dword [esp + 4], str.OpenFile_set_ofs.cBytes_to__d_n
cmp dl, 0x88
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe7d
call fcn.0045b740
movzx ecx, word [ebp - 0x5a6]
mov edx, 1
test cx, cx
je 0x46ec8c
mov esi, dword [0x8f0770]
xor edx, edx
test esi, esi
sete dl
mov dword [esp], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], str.OpenFile_set_ofs.nErrCode_to__d_n
call fcn.0045bef0
mov eax, 0xe7f
call fcn.0045b740
mov dword [esp + 4], 0x76d020
mov dword [esp], ebx
mov eax, dword [ebp - 0x634]
call eax
sub esp, 8
test eax, eax
sete al
mov dword [esp + 0xc], 0x76d020
movzx eax, al
mov dword [esp + 8], ebx
mov dword [esp], eax
mov dword [esp + 4], str.OpenFile_returned__s__but_was_expected_to_return__s_n
call fcn.0045bef0
mov edi, dword [ebp - 0x62c]
mov eax, 0xa5a5a5a5
mov ecx, 0x22
rep stosd dword es:[edi], eax
mov edi, dword fs:[0x18]
mov dword [edi + 0x34], 0xfaceabee
mov dword [esp + 8], 0x200
mov eax, dword [ebp - 0x62c]
mov dword [esp], 0x76d020
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x630]
call eax
sub esp, 0xc
mov esi, eax
mov eax, 0xe86
call fcn.0045b740
xor eax, eax
cmp esi, 1
mov dword [esp + 8], esi
sete al
mov dword [esp + 4], str.OpenFile_failed_on_delete___d__n
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe87
call fcn.0045b740
mov edx, dword [edi + 0x34]
mov eax, 1
cmp edx, 0xfaceabee
je 0x46ed71
xor eax, eax
test edx, edx
sete al
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.GetLastError___returns__ld_n
call fcn.0045bef0
mov eax, 0xe89
call fcn.0045b740
movzx edx, byte [ebp - 0x5a8]
mov dword [esp + 4], str.OpenFile_set_ofs.cBytes_to__d_n
cmp dl, 0x88
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe8a
call fcn.0045b740
movzx ecx, word [ebp - 0x5a6]
mov edx, 1
test cx, cx
je 0x46edda
mov eax, dword [0x8f0770]
xor edx, edx
test eax, eax
sete dl
mov dword [esp + 8], ecx
mov dword [esp], edx
mov dword [esp + 4], str.OpenFile_set_ofs.nErrCode_to__d_n
call fcn.0045bef0
mov eax, 0xe8c
call fcn.0045b740
mov dword [esp], ebx
mov dword [esp + 4], 0x76d020
mov eax, dword [ebp - 0x634]
call eax
sub esp, 8
test eax, eax
sete al
mov dword [esp + 8], ebx
movzx eax, al
mov dword [esp + 0xc], 0x76d020
mov dword [esp], eax
mov dword [esp + 4], str.OpenFile_returned__s__but_was_expected_to_return__s_n
call fcn.0045bef0
mov dword [esp], 0x76d020
mov eax, dword [ebp - 0x638]
call eax
sub esp, 4
mov ebx, eax
mov eax, 0xe90
call fcn.0045b740
xor eax, eax
cmp ebx, 0xffffffff
mov dword [esp + 4], str.GetFileAttributesA_succeeded_on_deleted_file_n
sete al
mov dword [esp], eax
call fcn.0045bef0
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret
mov dword [esp], esi
call dword [sym.imp.msvcrt.dll_strlen]
add eax, esi
cmp esi, eax
jae 0x46ee8b
cmp byte [eax - 1], 0x5c
je 0x46ee8b
mov byte [eax], 0x5c
add eax, 1
mov edx, dword [str.regedit.exe]
lea edi, [ebp - 0x5a8]
mov ecx, 0x22
mov dword [ebp - 0x62c], edi
mov ebx, edi
mov dword [eax], edx
mov edx, dword [0x59dcec]
mov dword [eax + 4], edx
mov edx, dword [0x59dcf0]
mov dword [eax + 8], edx
mov eax, 0xa5a5a5a5
rep stosd dword es:[edi], eax
mov eax, dword [sym.imp.kernel32.dll_OpenFile]
mov edi, dword fs:[0x18]
mov dword [edi + 0x34], 0xfaceabee
mov dword [esp + 4], ebx
mov dword [esp + 8], 0x4000
mov dword [esp], esi
mov dword [ebp - 0x630], eax
call eax
sub esp, 0xc
mov ebx, eax
mov eax, 0xe00
call fcn.0045b740
mov eax, dword [edi + 0x34]
mov dword [esp + 8], esi
mov dword [esp + 4], str._s_not_found_:__ld_n
mov dword [esp + 0xc], eax
xor eax, eax
cmp ebx, 1
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe01
call fcn.0045b740
mov edx, dword [edi + 0x34]
mov eax, 1
cmp edx, 0xfaceabee
je 0x46ef3c
xor eax, eax
test edx, edx
sete al
mov dword [esp + 8], edx
lea ebx, [ebp - 0x5a0]
mov dword [esp], eax
mov dword [esp + 4], str.GetLastError___returns__ld_n
call fcn.0045bef0
mov eax, 0xe03
call fcn.0045b740
movzx edx, byte [ebp - 0x5a8]
mov dword [esp + 4], str.OpenFile_set_ofs.cBytes_to__d_n
cmp dl, 0x88
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe04
call fcn.0045b740
movzx edx, word [ebp - 0x5a6]
mov dword [esp + 4], str.OpenFile_set_ofs.nErrCode_to__d_n
test dx, dx
mov dword [esp + 8], edx
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe05
call fcn.0045b740
mov eax, dword [sym.imp.kernel32.dll_lstrcmpiA]
mov dword [esp + 4], esi
mov dword [esp], ebx
mov dword [ebp - 0x634], eax
call eax
sub esp, 8
test eax, eax
sete al
mov dword [esp + 0xc], esi
movzx eax, al
mov dword [esp + 8], ebx
mov dword [esp + 4], str.OpenFile_returned__s__but_was_expected_to_return__s_or_string_filled_with_0xA5_n
mov dword [esp], eax
call fcn.0045bef0
jmp 0x46e365
lea eax, [ebp - 0x628]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_strncmp]
test eax, eax
sete al
movzx eax, al
jmp 0x46e543
cmp byte [eax - 1], 0x5c
je 0x46e3b3
mov byte [eax], 0x5c
add eax, 1
jmp 0x46e3b3
mov dword [esp], esi
call sub.msvcrt.dll_strlen
add esi, eax
mov eax, dword [0x59b5d1]
lea edi, [esi + 4]
mov dword [esi], eax
mov eax, dword [0x59b728]
and edi, 0xfffffffc
mov dword [esi + 0x157], eax
sub esi, edi
mov eax, 0x59b5d1
sub eax, esi
lea ecx, [esi + 0x15b]
shr ecx, 2
mov esi, eax
mov eax, 0xa5a5a5a5
rep movsd dword es:[edi], dword [esi]
mov ecx, 0x22
mov esi, dword fs:[0x18]
mov edi, dword [ebp - 0x62c]
rep stosd dword es:[edi], eax
mov dword [esi + 0x34], 0xfaceabee
mov dword [esp + 8], 0x4000
mov edi, dword [ebp - 0x62c]
mov dword [esp], 0x59b5d0
mov dword [esp + 4], edi
mov eax, dword [ebp - 0x630]
call eax
sub esp, 0xc
mov edi, eax
mov eax, 0xe2c
call fcn.0045b740
mov eax, dword [esi + 0x34]
mov dword [esp + 4], str.hFile___HFILE_ERROR_:__ld_n
mov dword [esp + 8], eax
xor eax, eax
cmp edi, 0xffffffff
sete al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe2d
call fcn.0045b740
mov edx, dword [esi + 0x34]
mov eax, 1
cmp edx, 0xd
je 0x46f111
xor eax, eax
cmp edx, 0xce
sete al
mov dword [esp + 8], edx
mov dword [esp], eax
mov dword [esp + 4], str.GetLastError___returns__ld_n
call fcn.0045bef0
mov esi, dword [0x8f0770]
call fcn.0057d110
mov ecx, dword [eax + 0x10]
mov dword [eax + 0x14], 1
lea edx, [ecx + ecx]
xor ecx, ecx
test esi, esi
setne cl
or edx, ecx
mov dword [eax + 0x10], edx
jmp 0x46f18e
call fcn.0057d110
mov dword [eax], 0x597dfd
movzx edx, byte [ebp - 0x5a8]
mov dword [eax + 4], 0xe30
cmp dl, 0xa5
mov dword [esp + 8], edx
sete al
mov dword [esp + 4], str.OpenFile_set_ofs.cBytes_to__d_n
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
call fcn.0057d110
shr dword [eax + 0x10], 1
call fcn.0057d110
mov edx, dword [eax + 0x14]
mov dword [eax + 0x14], 0
test edx, edx
jne 0x46f150
mov eax, 0xe31
call fcn.0045b740
movzx eax, word [ebp - 0x5a6]
mov dword [esp + 4], str.OpenFile_set_ofs.nErrCode_to__d_n
mov edx, eax
cmp ax, 0xd
mov dword [esp + 8], eax
sete al
cmp dx, 0xce
sete dl
or eax, edx
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
mov eax, 0xe33
call fcn.0045b740
lea eax, [ebp - 0x628]
mov dword [esp + 8], pe_nt_image_headers32
mov dword [esp + 4], eax
mov dword [esp], ebx
call dword [sym.imp.msvcrt.dll_strncmp]
mov dword [esp + 8], ebx
test eax, eax
mov dword [esp + 4], str.OpenFile_returned__s__but_was_expected_to_return_string_filled_with_0xA5_n
sete al
movzx eax, al
mov dword [esp], eax
call fcn.0045bef0
jmp 0x46e587
call dword [sym.imp.kernel32.dll_GetWindowsDirectoryA]
sub esp, 8
jmp 0x46e32f