Function at 0x40d2e0
Capabilities:
Get file size

Disassembly:
push ebp
mov eax, 0xffffffff
mov ebp, esp
sub esp, 0xd8
mov dword [ebp - 8], esi
mov esi, dword [ebp + 8]
mov dword [ebp - 0xc], ebx
mov dword [ebp - 4], edi
cmp byte [esi], 0
je 0x40d309
mov edx, dword [esi + 0x310]
test edx, edx
jne 0x40d316
mov ebx, dword [ebp - 0xc]
mov esi, dword [ebp - 8]
mov edi, dword [ebp - 4]
mov esp, ebp
pop ebp
ret
mov dword [esp + 4], esi
lea ebx, [ebp - 0x98]
xor edi, edi
mov dword [esp], ebx
call sym._strcpy
mov dword [esp], ebx
call sym.os_dirtrans_char_
mov dword [esp + 4], ebx
mov dword [esp], esi
call sym._strcpy
mov dword [esp + 0xc], edi
xor ecx, ecx
mov eax, pe_nt_image_headers32
mov dword [esp + 0x18], ecx
mov edx, 3
mov ecx, 1
mov dword [esp + 0x14], eax
mov eax, 0xc0000000
mov dword [esp + 0x10], edx
mov dword [esp + 8], ecx
mov dword [esp + 4], eax
mov dword [esp], ebx
call sub.KERNEL32.dll_CreateFileA
mov dword [ebp - 0x9c], eax
sub esp, 0x1c
mov eax, 0xffffffff
cmp dword [ebp - 0x9c], 0xffffffff
je 0x40d309
mov edi, dword [ebp - 0x9c]
xor edx, edx
xor ebx, ebx
mov dword [esp + 4], edx
mov dword [esp], edi
xor edi, edi
call sub.KERNEL32.dll_GetFileSize
mov dword [ebp - 0xa0], eax
sub esp, 8
xor ecx, ecx
mov dword [esp + 0x14], ebx
mov ebx, dword [ebp - 0x9c]
xor eax, eax
mov dword [esp + 0x10], ecx
mov edx, 4
mov dword [esp + 0xc], eax
mov dword [esp + 8], edx
mov dword [esp + 4], edi
mov dword [esp], ebx
call sub.KERNEL32.dll_CreateFileMappingA
mov dword [ebp - 0xa4], eax
sub esp, 0x18
test eax, eax
je 0x40d50f
mov byte [ebp - 0xa5], 0
xor edi, edi
xor eax, eax
cmp edi, dword [ebp - 0xa0]
mov dword [ebp - 0xac], eax
mov ecx, dword [ebp - 0xa4]
mov dword [esi + 0x84], ecx
jae 0x40d4c1
mov ecx, dword [esi + 0x310]
jmp 0x40d461
cmp byte [ebp - 0xa5], 0
jne 0x40d52a
mov dword [esi + edi*4 + 0x88], eax
mov ecx, dword [esi + 0x310]
mov eax, dword [ebp - 0xa0]
add dword [ebp - 0xac], ecx
mov dword [esi + edi*4 + 0x1c8], ebx
inc edi
cmp dword [ebp - 0xac], eax
setb dl
cmp edi, 0x4f
setle bl
test bl, dl
je 0x40d4c1
mov eax, dword [esi + 0x30c]
mov ebx, ecx
mov edx, dword [ebp - 0xac]
add ebx, eax
mov eax, dword [ebp - 0xa0]
sub eax, edx
cmp eax, ebx
jae 0x40d47f
mov ebx, eax
mov dword [esp + 0x10], ebx
mov ecx, dword [ebp - 0xac]
xor eax, eax
mov dword [esp + 8], eax
mov edx, 2
mov dword [esp + 4], edx
mov dword [esp + 0xc], ecx
mov ecx, dword [ebp - 0xa4]
mov dword [esp], ecx
call sub.KERNEL32.dll_MapViewOfFile
sub esp, 0x14
test eax, eax
jne 0x40d420
mov byte [ebp - 0xa5], 1
jmp 0x40d420
mov dword [esi + 0x314], edi
mov ebx, dword [ebp - 0x9c]
cmp edi, 0
mov ecx, dword [ebp - 0xa0]
mov dword [esi + 0x80], ebx
mov dword [esi + 0x308], ecx
jle 0x40d4f3
mov eax, edi
lea esi, [esi]
lea edi, [edi]
dec eax
jne 0x40d4f0
mov eax, dword [ebp - 0x9c]
jmp 0x40d309
mov edi, dword [esi + 0x84]
mov dword [esp], edi
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov esi, dword [ebp - 0x9c]
mov dword [esp], esi
call sub.KERNEL32.dll_CloseHandle
sub esp, 4
mov eax, 0xffffffff
jmp 0x40d309
xor ebx, ebx
lea esi, [esi]
cmp ebx, edi
jge 0x40d4fe
mov eax, dword [esi + ebx*4 + 0x88]
test eax, eax
jne 0x40d542
inc ebx
jmp 0x40d530
mov dword [esp], eax
call sub.KERNEL32.dll_UnmapViewOfFile
sub esp, 4
inc ebx
jmp 0x40d530