Function at 0x40c860
Capabilities:
Read file on windows

Disassembly:
push ebp
lea ebp, [esp - 0x2820]
mov eax, 0x2820
call fcn.004a5f50
push 0xffffffffffffffff
push 0x4ad028
mov eax, dword fs:[0]
push eax
sub esp, 0x24
mov eax, dword [0x4d25ac]
xor eax, ebp
mov dword [ebp + 0x281c], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 0x2828]
xor ebx, ebx
push 0xffffffffffffffff
mov dword [ebp - 0x10], ecx
xor edx, edx
add eax, 4
push ebx
lea ecx, [ebp]
mov dword [ebp + 0x18], 7
mov dword [ebp + 0x14], ebx
mov word [ebp + 4], dx
call fcn.00401c20
push 0x15
mov eax, str.avg_secure_search.tmp
lea ecx, [ebp]
mov dword [ebp - 4], ebx
call fcn.00403430
mov esi, dword [sym.imp.KERNEL32.dll_SetLastError]
push ebx
call esi
cmp dword [ebp + 0x18], 8
mov eax, dword [ebp + 4]
jae 0x40c8ed
lea eax, [ebp + 4]
push ebx
push 0x80
push 4
push ebx
push 1
push SysReAllocString
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov edi, eax
cmp edi, 0xffffffff
jne 0x40c96b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
xor eax, eax
mov word [ebp - 0x28], ax
push 0x48
mov eax, str.CFirefoxBrowser::ReplaceCommonValues_____CreateFile_failed._GetLastError
lea esi, [ebp - 0x2c]
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], ebx
call fcn.00401f30
mov ecx, edi
mov byte [ebp - 4], 1
call fcn.00403270
mov esi, 8
cmp dword [ebp - 0x14], esi
jb 0x40c953
mov ecx, dword [ebp - 0x28]
push ecx
call fcn.00491101
add esp, 4
cmp dword [ebp + 0x18], esi
jb 0x40c964
mov edx, dword [ebp + 4]
push edx
call fcn.00491101
add esp, 4
xor al, al
jmp 0x40ca46
push ebx
mov byte [ebp + 0x1c], bl
call esi
push ebx
lea eax, [ebp - 0x30]
push eax
push 0x2800
lea ecx, [ebp + 0x1c]
push ecx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x40c9f0
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0x10], eax
xor edx, edx
push 0x46
mov eax, str.CFirefoxBrowser::ReplaceCommonValues_____ReadFile_failed._GetLastError
lea esi, [ebp - 0x2c]
mov dword [ebp - 0x14], 7
mov dword [ebp - 0x18], ebx
mov word [ebp - 0x28], dx
call fcn.00401f30
mov ecx, dword [ebp - 0x10]
mov byte [ebp - 4], 2
call fcn.00403270
mov esi, 8
cmp dword [ebp - 0x14], esi
jb 0x40c9d4
mov eax, dword [ebp - 0x28]
push eax
call fcn.00491101
add esp, 4
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
cmp dword [ebp + 0x18], esi
jb 0x40c964
mov ecx, dword [ebp + 4]
push ecx
call fcn.00491101
add esp, 4
xor al, al
jmp 0x40ca46
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea edx, [ebp + 0x1c]
push edx
call dword [sym.imp.KERNEL32.dll_lstrlenA]
mov edi, eax
inc edi
cmp edi, 0x3fffffff
jle 0x40ca10
xor eax, eax
jmp 0x40ca26
lea eax, [edi + edi]
call fcn.0049a5e0
mov esi, esp
push 3
mov edx, edi
lea eax, [ebp + 0x1c]
call fcn.00404150
mov ecx, dword [ebp - 0x30]
mov esi, dword [ebp - 0x10]
push ecx
call fcn.00401f30
cmp dword [ebp + 0x18], 8
jb 0x40ca44
mov edx, dword [ebp + 4]
push edx
call fcn.00491101
add esp, 4
mov al, 1
lea esp, [ebp - 0x40]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp + 0x281c]
xor ecx, ebp
call fcn.0049110c
add ebp, 0x2820
mov esp, ebp
pop ebp
ret 4