Function at 0xbff7a380
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 0xbff7a63e
mov eax, dword [esp + 0x140]
test eax, eax
je 0xbff7a63e
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.bff73560
mov ebp, dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
add esp, 0xc
lea ecx, [esp + 0x34]
push ecx
call ebp
cmp eax, 0xffffffff
jne 0xbff7a525
push 0x5c
push ebx
call fcn.bff734a0
add esp, 8
test eax, eax
jne 0xbff7a525
lea edx, [esp + 0x34]
push 0x104
push edx
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryA]
test eax, eax
je 0xbff7a483
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 0xbff7a458
mov edi, 0xbff840bc
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 0xbff7a525
lea ecx, [esp + 0x34]
push 0x104
push ecx
call dword [sym.imp.KERNEL32.dll_GetWindowsDirectoryA]
test eax, eax
je 0xbff7a515
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 0xbff7a4ea
mov edi, 0xbff840bc
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 0xbff7a63e
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 0xbff7a63e
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 0xbff7a59c
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 0xbff7a632
mov esi, dword [eax + 0x3c]
mov ecx, dword [0xbff84078]
add esi, eax
mov edx, dword [esi]
cmp edx, ecx
je 0xbff7a5e3
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 0xbff7a62b
mov edx, dword [esi + 0x78]
mov edi, dword [ecx + 0xc]
cmp edx, edi
jb 0xbff7a617
mov ebx, dword [ecx + 8]
add ebx, edi
mov edi, dword [esi + 0x7c]
add edi, edx
cmp edi, ebx
jbe 0xbff7a64b
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x10]
add ecx, 0x28
inc edi
cmp edi, ebp
mov dword [esp + 0x10], edi
jb 0xbff7a5fe
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 0xbff7a71e
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 0xbff7a6cd
test dl, dl
je 0xbff7a6c9
mov bl, byte [ecx + 1]
mov dl, bl
cmp bl, byte [esi + 1]
jne 0xbff7a6cd
add ecx, 2
add esi, 2
test dl, dl
jne 0xbff7a6a9
xor ecx, ecx
jmp 0xbff7a6d2
sbb ecx, ecx
sbb ecx, 0xffffffff
test ecx, ecx
je 0xbff7a6f4
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 0xbff7a698
jmp 0xbff7a71e
mov ecx, dword [esp + 0x144]
test ecx, ecx
je 0xbff7a716
mov esi, dword [esp + 0x30]
mov edi, dword [esp + 0x10]
xor edx, edx
mov dx, word [esi + edi*2]
mov esi, dword [esp + 0x2c]
mov edx, dword [esi + edx*4]
mov dword [ecx], edx
mov dword [esp + 0x18], 1
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