Function at 0x6a23cc
Capabilities:
Check if file exists
Get file size
Read file via mapping

Disassembly:
push ebp
mov ebp, esp
push edi
push esi
push ebx
sub esp, 0x17c
mov eax, dword [ebp + 8]
mov dword [ebp - 0x15c], eax
mov eax, dword [sym.imp.libssp_0.dll___stack_chk_guard]
mov dword [ebp - 0x1c], eax
xor eax, eax
mov dword [ebp - 0x120], 0
lea edx, [ebp - 0x11c]
mov eax, 0
mov ecx, 0x40
mov edi, edx
rep stosd dword es:[edi], eax
mov dword [esp], 0xc
call fcn.006c514f
mov dword [ebp - 0x140], eax
mov dword [ebp - 0x144], 0
mov dword [ebp - 0x13c], 0xffffffff
mov eax, dword [ebp - 0x140]
mov dword [eax + 8], 0
mov dword [esp + 8], 0x104
mov eax, dword [ebp - 0x15c]
mov dword [esp + 4], eax
lea eax, [ebp - 0x120]
mov dword [esp], eax
call fcn.006c1a88
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], pe_nt_image_headers32
mov dword [esp + 0x10], 3
mov dword [esp + 0xc], 0
mov dword [esp + 8], 1
mov dword [esp + 4], 0x80000000
lea eax, [ebp - 0x120]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileA]
call eax
sub esp, 0x1c
mov dword [ebp - 0x13c], eax
cmp dword [ebp - 0x13c], 0xffffffff
je 0x6a26bd
lea eax, [ebp - 0x14c]
mov dword [esp + 4], eax
mov eax, dword [ebp - 0x13c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetFileSize]
call eax
sub esp, 8
mov dword [ebp - 0x138], eax
cmp dword [ebp - 0x138], 0xffffffff
jne 0x6a2524
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
test eax, eax
je 0x6a2524
mov eax, dword [ebp - 0x15c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Error_getting_size_of___s_.
mov dword [esp + 0xc], str.tor_mmap_file
mov dword [esp + 4], 0x10
mov dword [esp + 8], 0
mov dword [esp], 4
call fcn.006bf072
jmp 0x6a26c4
cmp dword [ebp - 0x138], 0
jne 0x6a257c
mov eax, dword [ebp - 0x14c]
test eax, eax
jne 0x6a257c
mov eax, dword [ebp - 0x15c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.File___s__is_empty._Ignoring.
mov dword [esp + 0xc], str.tor_mmap_file
mov dword [esp + 4], 0x10
mov dword [esp + 8], 0
mov dword [esp], 6
call fcn.006bf072
mov dword [ebp - 0x144], 1
jmp 0x6a27a1
mov eax, dword [ebp - 0x14c]
mov edx, 0
mov edx, eax
mov eax, 0
mov ecx, dword [ebp - 0x138]
mov ebx, 0
mov esi, eax
or esi, ecx
mov dword [ebp - 0x128], esi
mov eax, edx
or eax, ebx
mov dword [ebp - 0x124], eax
cmp dword [ebp - 0x124], 0
jbe 0x6a25f1
mov eax, dword [ebp - 0x15c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.File___s__is_too_big_to_map__not_trying.
mov dword [esp + 0xc], str.tor_mmap_file
mov dword [esp + 4], 0x10
mov dword [esp + 8], 0
mov dword [esp], 4
call fcn.006bf072
jmp 0x6a27a1
mov edx, dword [ebp - 0x128]
mov eax, dword [ebp - 0x140]
mov dword [eax + 4], edx
mov eax, dword [ebp - 0x14c]
mov dword [esp + 0x14], 0
mov edx, dword [ebp - 0x138]
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], eax
mov dword [esp + 8], 2
mov dword [esp + 4], 0
mov eax, dword [ebp - 0x13c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
call eax
sub esp, 0x18
mov edx, dword [ebp - 0x140]
mov dword [edx + 8], eax
mov eax, dword [ebp - 0x140]
mov eax, dword [eax + 8]
test eax, eax
je 0x6a26c0
mov eax, dword [ebp - 0x140]
mov eax, dword [eax + 8]
mov dword [esp + 0x10], 0
mov dword [esp + 0xc], 0
mov dword [esp + 8], 0
mov dword [esp + 4], 4
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_MapViewOfFile]
call eax
sub esp, 0x14
mov edx, dword [ebp - 0x140]
mov dword [edx], eax
mov eax, dword [ebp - 0x140]
mov eax, dword [eax]
test eax, eax
je 0x6a26c3
mov eax, dword [ebp - 0x13c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x140]
jmp 0x6a27e6
nop
jmp 0x6a26c4
nop
jmp 0x6a26c4
nop
mov eax, dword [sym.imp.KERNEL32.dll_GetLastError]
call eax
mov dword [ebp - 0x134], eax
cmp dword [ebp - 0x134], 2
je 0x6a26e3
cmp dword [ebp - 0x134], 3
jne 0x6a26ea
mov eax, 6
jmp 0x6a26ef
mov eax, 4
mov dword [ebp - 0x130], eax
mov eax, dword [ebp - 0x134]
mov dword [esp], eax
call fcn.006c1578
mov dword [ebp - 0x148], eax
mov eax, dword [ebp - 0x148]
mov dword [esp + 0x18], eax
mov eax, dword [ebp - 0x15c]
mov dword [esp + 0x14], eax
mov dword [esp + 0x10], str.Couldnt_mmap_file___s_:__s
mov dword [esp + 0xc], str.tor_mmap_file
mov dword [esp + 4], 0x10
mov dword [esp + 8], 0
mov eax, dword [ebp - 0x130]
mov dword [esp], eax
call fcn.006bf072
lea eax, [ebp - 0x148]
mov dword [ebp - 0x12c], eax
mov eax, dword [ebp - 0x12c]
mov eax, dword [eax]
mov dword [esp], eax
call sub.msvcrt.dll_free
mov eax, dword [ebp - 0x12c]
mov dword [eax], 0
cmp dword [ebp - 0x134], 2
je 0x6a2785
cmp dword [ebp - 0x134], 3
jne 0x6a2794
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 2
jmp 0x6a27a1
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0x16
cmp dword [ebp - 0x144], 0
je 0x6a27b7
mov eax, dword [sym.imp.msvcrt.dll__errno]
call eax
mov dword [eax], 0x22
cmp dword [ebp - 0x13c], 0xffffffff
je 0x6a27d3
mov eax, dword [ebp - 0x13c]
mov dword [esp], eax
mov eax, dword [sym.imp.KERNEL32.dll_CloseHandle]
call eax
sub esp, 4
mov eax, dword [ebp - 0x140]
mov dword [esp], eax
call fcn.006a27fe
mov eax, 0
mov ebx, dword [ebp - 0x1c]
xor ebx, dword [sym.imp.libssp_0.dll___stack_chk_guard]
je 0x6a27f6
call sub.libssp_0.dll___stack_chk_fail
lea esp, [ebp - 0xc]
pop ebx
pop esi
pop edi
pop ebp
ret