Function at 0x4a8992
Capabilities:
Check if file exists

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x98
mov eax, dword [0x52de80]
xor eax, ebp
mov dword [ebp - 4], eax
push ebx
push esi
push edi
mov ebx, ecx
push str.Selfportect_start_r_n
push 0x55913c
mov dword [ebp - 0x8c], ebx
call fcn.004a985e
pop ecx
pop ecx
call fcn.00420e9a
push eax
lea ecx, [ebp - 0x80]
call fcn.00423ea0
lea eax, [ebx + 0x20]
push eax
lea ecx, [ebp - 0x80]
call fcn.00425bd3
lea eax, [ebp - 0x80]
push eax
call fcn.0049dd3c
mov esi, str.Local_State
push esi
call fcn.00424236
pop ecx
pop ecx
push eax
push esi
lea ecx, [ebp - 0x80]
call fcn.0043af25
push dword [ebp - 0x80]
lea ecx, [ebp - 0x1c]
call fcn.004045b0
cmp dword [ebp - 8], 8
lea eax, [ebp - 0x1c]
cmovae eax, dword [ebp - 0x1c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
push 0xf
xor ebx, ebx
pop esi
test eax, eax
jne 0x4a8ae4
push 0x10
mov dword [ebp - 0x20], esi
mov dword [ebp - 0x24], ebx
mov byte [ebp - 0x34], bl
call fcn.0048156c
pop ecx
test eax, eax
je 0x4a8a43
mov ecx, eax
call fcn.0040e570
mov ebx, eax
lea eax, [ebp - 0x34]
push eax
push ebx
call fcn.00412320
cmp dword [ebp - 8], 8
lea eax, [ebp - 0x1c]
pop ecx
cmovae eax, dword [ebp - 0x1c]
pop ecx
push eax
lea ecx, [ebp - 0x4c]
call fcn.004045b0
cmp dword [ebp - 0x20], 0x10
lea eax, [ebp - 0x34]
push dword [ebp - 0x24]
cmovae eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.00408630
push eax
call fcn.0040ac40
add esp, 0xc
lea ecx, [ebp - 0x7c]
mov esi, eax
call fcn.00408680
push 0
push 1
lea ecx, [ebp - 0x4c]
call fcn.00402540
cmp esi, 0xffffffff
jne 0x4a8ac8
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
sub esp, 0x18
lea esi, [ebp - 0x1c]
push 6
pop ecx
mov edi, esp
push str.WriteFile__ws_errcode_d_r_n
rep movsd dword es:[edi], dword [esi]
push 0x55913c
call fcn.004a985e
add esp, 0x24
test ebx, ebx
je 0x4a8ad4
mov eax, dword [ebx]
mov ecx, ebx
push 1
call dword [eax]
xor ebx, ebx
lea ecx, [ebp - 0x34]
push ebx
push 1
call fcn.00402490
push 0xf
pop esi
cmp dword [ebp - 8], 8
lea eax, [ebp - 0x1c]
lea ecx, [ebp - 0x4c]
mov dword [ebp - 0x50], esi
cmovae eax, dword [ebp - 0x1c]
push eax
mov dword [ebp - 0x54], ebx
mov byte [ebp - 0x64], bl
call fcn.004045b0
lea eax, [ebp - 0x64]
push eax
lea eax, [ebp - 0x4c]
push eax
lea ecx, [ebp - 0x7c]
call fcn.00408630
push eax
call fcn.00411fc0
pop ecx
pop ecx
lea ecx, [ebp - 0x7c]
mov bl, al
call fcn.00408680
push 0
push 1
lea ecx, [ebp - 0x4c]
call fcn.00402540
test bl, bl
je 0x4a8cf8
cmp dword [ebp - 0x50], 0x10
lea eax, [ebp - 0x64]
cmovae eax, dword [ebp - 0x64]
mov dword [ebp - 0x94], eax
mov eax, dword [ebp - 0x54]
mov dword [ebp - 0x90], eax
lea eax, [ebp - 0x94]
push eax
call fcn.004122e0
mov edi, eax
mov dword [ebp - 0x88], edi
pop ecx
test edi, edi
je 0x4a8d1e
mov edx, dword [edi]
lea eax, [ebp - 0x84]
and dword [ebp - 0x84], 0
mov ecx, edi
push eax
call dword [edx + 0x2c]
push str.safe.selfprotect
lea ecx, [ebp - 0x4c]
call fcn.00401f90
mov ecx, dword [ebp - 0x84]
lea eax, [ebp - 0x98]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.0040ed00
mov bl, al
lea ecx, [ebp - 0x4c]
push 0
neg bl
push 1
sbb bl, bl
call fcn.00402490
inc bl
je 0x4a8cc9
xor eax, eax
cmp byte [ebp + 8], al
setne al
push eax
push str.dict_formentry__Get_no_exists_bool___d_r_n
push 0x55913c
call fcn.004a985e
add esp, 0xc
lea ecx, [ebp - 0x4c]
push str.safe.selfprotect
call fcn.00401f90
push dword [ebp + 8]
mov ecx, dword [ebp - 0x84]
lea eax, [ebp - 0x4c]
push eax
call fcn.0040e940
xor ebx, ebx
lea ecx, [ebp - 0x4c]
push ebx
push 1
call fcn.00402490
lea eax, [ebp - 0x34]
mov dword [ebp - 0x20], esi
push eax
push edi
mov dword [ebp - 0x24], ebx
mov byte [ebp - 0x34], bl
call fcn.00412320
cmp dword [ebp - 8], 8
lea eax, [ebp - 0x1c]
pop ecx
cmovae eax, dword [ebp - 0x1c]
pop ecx
push eax
lea ecx, [ebp - 0x4c]
call fcn.004045b0
cmp dword [ebp - 0x20], 0x10
lea eax, [ebp - 0x34]
push dword [ebp - 0x24]
cmovae eax, dword [ebp - 0x34]
lea ecx, [ebp - 0x7c]
push eax
lea eax, [ebp - 0x4c]
push eax
call fcn.00408630
push eax
call fcn.0040ac40
add esp, 0xc
lea ecx, [ebp - 0x7c]
mov esi, eax
call fcn.00408680
push ebx
push 1
lea ecx, [ebp - 0x4c]
call fcn.00402540
cmp esi, 0xffffffff
jne 0x4a8c9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
sub esp, 0x18
lea esi, [ebp - 0x1c]
push 6
pop ecx
mov edi, esp
push str.WriteFile__ws_errcode_d_r_n
rep movsd dword es:[edi], dword [esi]
push 0x55913c
call fcn.004a985e
mov edi, dword [ebp - 0x88]
add esp, 0x24
mov ecx, dword [ebp - 0x8c]
lea eax, [ebp - 0x88]
push eax
add ecx, 0xd8
mov dword [ebp - 0x88], 1
call fcn.0041f080
push ebx
push 1
lea ecx, [ebp - 0x34]
call fcn.00402490
jmp 0x4a8cee
cmp dword [ebp - 8], 8
lea esi, [ebp - 0x1c]
cmovae esi, dword [ebp - 0x1c]
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push esi
push str.ReadFileToString__ws_errcode_r_n
push 0x55913c
call fcn.004a985e
add esp, 0x10
mov eax, dword [edi]
mov ecx, edi
push 1
call dword [eax]
jmp 0x4a8d1e
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
sub esp, 0x18
lea esi, [ebp - 0x1c]
push 6
pop ecx
mov edi, esp
push str.WriteFile__ws_errcode_d_r_n
rep movsd dword es:[edi], dword [esi]
push 0x55913c
call fcn.004a985e
add esp, 0x24
push str.Selfportect_end_r_n
push 0x55913c
call fcn.004a985e
pop ecx
pop ecx
push 0
push 1
lea ecx, [ebp - 0x64]
call fcn.00402490
push 0
push 1
lea ecx, [ebp - 0x1c]
call fcn.00402540
mov ecx, dword [ebp - 0x80]
lea ecx, [ecx - 0x10]
call fcn.004209ab
mov ecx, dword [ebp - 4]
pop edi
pop esi
xor ecx, ebp
pop ebx
call fcn.004bc11d
mov esp, ebp
pop ebp
ret 4