Function at 0x10018ea0
Capabilities:
Check if file exists
Enumerate pe sections
Get common file path
Get file attributes
Get file size
Read file via mapping
Resolve function by parsing pe exports

Disassembly:
sub esp, 0x128
push ebx
mov ebx, dword [esp + 0x130]
push ebp
push esi
test ebx, ebx
push edi
mov dword [esp + 0x18], 0
je 0x1001915e
mov eax, dword [esp + 0x140]
test eax, eax
je 0x1001915e
mov ecx, 0x40
xor eax, eax
lea edi, [esp + 0x35]
mov byte [esp + 0x34], 0
rep stosd dword es:[edi], eax
stosw word es:[edi], ax
stosb byte es:[edi], al
push 0x103
lea eax, [esp + 0x38]
push ebx
push eax
call fcn.1000d520
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
call ebp
cmp eax, 0xffffffff
jne 0x10019045
push 0x5c
push ebx
call fcn.1000dbf0
add esp, 8
test eax, eax
jne 0x10019045
lea edx, [esp + 0x34]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0x10018fa3
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x33], 0x5c
je 0x10018f78
mov edi, 0x100244c8
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x34]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x34]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x34]
push eax
call ebp
cmp eax, 0xffffffff
jne 0x10019045
lea ecx, [esp + 0x34]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0x10019035
lea edi, [esp + 0x34]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
dec ecx
cmp byte [esp + ecx + 0x33], 0x5c
je 0x1001900a
mov edi, 0x100244c8
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x34]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov edi, edx
mov edx, ecx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, edx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, ebx
or ecx, 0xffffffff
xor eax, eax
lea edx, [esp + 0x34]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
lea eax, [esp + 0x34]
push eax
call ebp
cmp eax, 0xffffffff
je 0x1001915e
push 0
push 0x80
push 3
push 0
push 3
lea ecx, [esp + 0x48]
push 0x80000000
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov ebx, eax
cmp ebx, 0xffffffff
mov dword [esp + 0x14], ebx
je 0x1001915e
lea edx, [esp + 0x1c]
mov dword [esp + 0x1c], 0
push edx
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, dword [esp + 0x1c]
mov esi, eax
mov eax, dword [str.TODETOURS_FRAME_PE_Mapping]
push eax
push esi
push ecx
push 2
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_CreateFileMappingA]
mov edi, eax
test edi, edi
mov dword [esp + 0x20], edi
jne 0x100190bc
push ebx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x128
ret
push esi
push 0
push 0
push 4
push edi
call dword [sym.imp.KERNEL32.dll_MapViewOfFile]
test eax, eax
je 0x10019152
mov esi, dword [eax + 0x3c]
mov ecx, dword [0x10024460]
add esi, eax
mov edx, dword [esi]
cmp edx, ecx
je 0x10019103
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push ebx
call esi
push edi
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x128
ret
xor ebp, ebp
lea ecx, [esi + 0xf8]
mov bp, word [esi + 6]
mov dword [esp + 0x10], 0
test ebp, ebp
jbe 0x1001914b
mov edx, dword [esi + 0x78]
mov edi, dword [ecx + 0xc]
cmp edx, edi
jb 0x10019137
mov ebx, dword [ecx + 8]
add ebx, edi
mov edi, dword [esi + 0x7c]
add edi, edx
cmp edi, ebx
jbe 0x1001916b
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
add ecx, 0x28
inc edi
cmp edi, ebp
mov dword [esp + 0x10], edi
jb 0x1001911e
mov edi, dword [esp + 0x20]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push edi
call esi
push ebx
call esi
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x128
ret
mov edi, dword [ecx + 0x14]
mov ebp, dword [ecx + 0xc]
mov ecx, edi
mov dword [esp + 0x10], 0
sub ecx, ebp
add ecx, edx
mov edx, dword [ecx + eax + 0x1c]
add ecx, eax
sub edx, ebp
add edx, edi
mov esi, dword [ecx + 0x18]
add edx, eax
mov dword [esp + 0x2c], edx
mov edx, dword [ecx + 0x20]
mov ecx, dword [ecx + 0x24]
sub edx, ebp
sub ecx, ebp
add edx, edi
add ecx, edi
add edx, eax
add ecx, eax
mov dword [esp + 0x28], esi
test esi, esi
mov dword [esp + 0x30], ecx
jbe 0x10019253
mov dword [esp + 0x24], edx
mov ebx, dword [edx]
mov esi, dword [esp + 0x140]
mov ecx, edi
sub ecx, ebp
add ecx, eax
add ecx, ebx
mov bl, byte [ecx]
mov dl, bl
cmp bl, byte [esi]
jne 0x100191ed
test dl, dl
je 0x100191e9
mov bl, byte [ecx + 1]
mov dl, bl
cmp bl, byte [esi + 1]
jne 0x100191ed
add ecx, 2
add esi, 2
test dl, dl
jne 0x100191c9
xor ecx, ecx
jmp 0x100191f2
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
je 0x10019214
mov ecx, dword [esp + 0x10]
mov edx, dword [esp + 0x24]
mov esi, dword [esp + 0x28]
inc ecx
add edx, 4
cmp ecx, esi
mov dword [esp + 0x10], ecx
mov dword [esp + 0x24], edx
jb 0x100191b8
jmp 0x10019253
mov esi, dword [esp + 0x30]
mov ebx, dword [esp + 0x10]
mov ecx, dword [esp + 0x148]
xor edx, edx
mov dx, word [esi + ebx*2]
mov esi, dword [esp + 0x2c]
mov dword [esp + 0x18], 1
mov esi, dword [esi + edx*4]
mov edx, ecx
sub esi, ebp
add esi, edi
mov edi, dword [esp + 0x144]
add esi, eax
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
push eax
call dword [sym.imp.KERNEL32.dll_UnmapViewOfFile]
mov eax, dword [esp + 0x20]
mov esi, dword [sym.imp.KERNEL32.dll_CloseHandle]
push eax
call esi
mov ecx, dword [esp + 0x14]
push ecx
call esi
mov eax, dword [esp + 0x18]
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x128
ret