Function at 0x409788
Capabilities:
Get file size
Read file on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff54
mov eax, 0x4d97d0
call fcn.004c9c18
mov dword [ebp - 0x68], 1
lea edx, [ebp + 0xc]
lea eax, [ebp + 0xc]
call fcn.004d4474
inc dword [ebp - 0x68]
mov word [ebp - 0x74], 8
mov eax, dword [ebp + 0xc]
call fcn.0043e73c
test al, al
jne 0x409829
mov word [ebp - 0x74], 0x14
mov edx, 0x4d6e7f
lea eax, [ebp - 0x14]
call fcn.004d443c
inc dword [ebp - 0x68]
lea edx, [ebp - 0x14]
mov eax, dword [ebp + 8]
call fcn.004d45cc
mov eax, dword [ebp + 8]
mov word [ebp - 0x74], 0x20
push eax
dec dword [ebp - 0x68]
lea eax, [ebp - 0x14]
mov edx, 2
call fcn.004d459c
dec dword [ebp - 0x68]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.004d459c
pop eax
mov word [ebp - 0x74], 0x14
inc dword [ebp - 0x68]
mov edx, dword [ebp - 0x84]
mov dword fs:[0], edx
jmp 0x409faa
push 4
call fcn.004c8e2c
pop ecx
mov dword [ebp - 0x88], eax
mov word [ebp - 0x74], 8
xor ecx, ecx
mov dword [ebp - 0x8c], ecx
xor eax, eax
mov dword [ebp - 0x90], eax
mov word [ebp - 0x74], 0x2c
mov edx, 0x4d6e81
lea eax, [ebp - 4]
call fcn.004d443c
inc dword [ebp - 0x68]
mov word [ebp - 0x74], 8
push 4
push 0
push dword [ebp - 0x88]
call fcn.004c98cc
add esp, 0xc
push 0
push 0x20
push 3
push 0
push 1
push 0x80000000
cmp dword [ebp + 0xc], 0
je 0x409895
mov edx, dword [ebp + 0xc]
jmp 0x40989a
mov edx, 0x4d6e82
push edx
call sub.kernel32.dll_CreateFileA
mov dword [ebp - 0x8c], eax
push 0
push dword [ebp - 0x8c]
call sub.kernel32.dll_GetFileSize
mov dword [ebp - 0x90], eax
push 0
push 0
push 0
push dword [ebp - 0x8c]
call sub.kernel32.dll_SetFilePointer
xor eax, eax
mov dword [ebp - 0x94], eax
mov word [ebp - 0x74], 0x38
mov edx, 0x4d6e83
lea eax, [ebp - 8]
call fcn.004d443c
inc dword [ebp - 0x68]
mov word [ebp - 0x74], 8
xor ecx, ecx
mov dword [ebp - 0x98], ecx
mov word [ebp - 0x74], 0x44
mov edx, 0x4d6e84
lea eax, [ebp - 0xc]
call fcn.004d443c
inc dword [ebp - 0x68]
mov word [ebp - 0x74], 8
xor ecx, ecx
mov dword [ebp - 0x9c], ecx
xor eax, eax
mov dword [ebp - 0xa0], eax
push 0
push 0
mov edx, dword [ebp - 0x9c]
inc dword [ebp - 0x9c]
push edx
push dword [ebp - 0x8c]
call sub.kernel32.dll_SetFilePointer
push 0
lea ecx, [ebp - 0xa0]
push ecx
push 4
push dword [ebp - 0x88]
push dword [ebp - 0x8c]
call sub.kernel32.dll_ReadFile
test eax, eax
jne 0x40999f
push dword [ebp - 0x8c]
call sub.kernel32.dll_CloseHandle
mov word [ebp - 0x74], 0x50
mov edx, 0x4d6e85
lea eax, [ebp - 0x18]
call fcn.004d443c
inc dword [ebp - 0x68]
lea edx, [ebp - 0x18]
lea eax, [ebp - 4]
call fcn.004d45cc
dec dword [ebp - 0x68]
lea eax, [ebp - 0x18]
mov edx, 2
call fcn.004d459c
jmp 0x409dcb
mov word [ebp - 0x74], 0x5c
mov edx, 0x4d6ea0
lea eax, [ebp - 0x1c]
call fcn.004d443c
inc dword [ebp - 0x68]
lea edx, [ebp - 0x1c]
lea eax, [ebp - 8]
call fcn.004d45cc
dec dword [ebp - 0x68]
lea eax, [ebp - 0x1c]
mov edx, 2
call fcn.004d459c
xor ecx, ecx
mov dword [ebp - 0x94], ecx
xor eax, eax
mov dword [ebp - 0xa4], eax
mov word [ebp - 0x74], 8
cmp dword [ebp - 0xa4], 4
jge 0x409a44
mov word [ebp - 0x74], 0x68
xor edx, edx
mov dword [ebp - 0x20], edx
lea ecx, [ebp - 0x20]
inc dword [ebp - 0x68]
mov eax, dword [ebp - 0x88]
mov edx, dword [ebp - 0xa4]
movzx eax, byte [eax + edx]
mov edx, 2
call fcn.0043e324
lea edx, [ebp - 0x20]
lea eax, [ebp - 8]
call fcn.004d45e0
dec dword [ebp - 0x68]
lea eax, [ebp - 0x20]
mov edx, 2
call fcn.004d459c
inc dword [ebp - 0xa4]
cmp dword [ebp - 0xa4], 4
jl 0x4099ef
lea edx, [ebp - 8]
lea eax, [ebp - 0xc]
call fcn.004d45e0
mov word [ebp - 0x74], 0x74
xor ecx, ecx
mov dword [ebp - 0x24], ecx
lea ecx, [ebp - 0x24]
inc dword [ebp - 0x68]
lea edx, [ebp - 8]
mov eax, 0x4d6ea1
call fcn.004d4894
lea edx, [ebp - 0x24]
lea eax, [ebp - 8]
call fcn.004d45cc
dec dword [ebp - 0x68]
lea eax, [ebp - 0x24]
mov edx, 2
call fcn.004d459c
lea edx, [ebp - 0x94]
mov eax, dword [ebp - 8]
call fcn.0043e3b4
test al, al
jne 0x409ac7
mov word [ebp - 0x74], 0x80
mov edx, 0x4d6ea4
lea eax, [ebp - 0x28]
call fcn.004d443c
inc dword [ebp - 0x68]
mov eax, dword [eax]
call fcn.0048fca4
dec dword [ebp - 0x68]
lea eax, [ebp - 0x28]
mov edx, 2
call fcn.004d459c
mov edx, 0x4d6eb2
lea eax, [ebp - 0x30]
call fcn.004d443c
inc dword [ebp - 0x68]
lea ecx, [ebp - 0x30]
push ecx
mov word [ebp - 0x74], 0x8c
push dword [ebp - 0x94]
xor eax, eax
mov dword [ebp - 0x2c], eax
lea edx, [ebp - 0x2c]
push edx
inc dword [ebp - 0x68]
call fcn.004096a0
add esp, 8
lea eax, [ebp - 0x2c]
pop edx
call fcn.004d473c
mov dword [ebp - 0x98], eax
dec dword [ebp - 0x68]
lea eax, [ebp - 0x30]
mov edx, 2
call fcn.004d459c
dec dword [ebp - 0x68]
lea eax, [ebp - 0x2c]
mov edx, 2
call fcn.004d459c
cmp dword [ebp - 0x98], 0
je 0x409922
cmp dword [ebp - 0x98], 1
je 0x409d90
xor ecx, ecx
mov dword [ebp - 0xa8], ecx
mov word [ebp - 0x74], 8
push 0
push 0
mov eax, dword [ebp - 0x9c]
inc dword [ebp - 0x9c]
push eax
push dword [ebp - 0x8c]
call sub.kernel32.dll_SetFilePointer
push 0
lea edx, [ebp - 0xa8]
push edx
push 4
push dword [ebp - 0x88]
push dword [ebp - 0x8c]
call sub.kernel32.dll_ReadFile
test eax, eax
jne 0x409bbb
mov word [ebp - 0x74], 0x98
mov edx, 0x4d6ebe
lea eax, [ebp - 0x34]
call fcn.004d443c
inc dword [ebp - 0x68]
mov eax, dword [eax]
call fcn.0048fca4
dec dword [ebp - 0x68]
lea eax, [ebp - 0x34]
mov edx, 2
call fcn.004d459c
mov word [ebp - 0x74], 0xa4
mov edx, 0x4d6ec4
lea eax, [ebp - 0x38]
call fcn.004d443c
inc dword [ebp - 0x68]
lea edx, [ebp - 0x38]
lea eax, [ebp - 8]
call fcn.004d45cc
dec dword [ebp - 0x68]
lea eax, [ebp - 0x38]
mov edx, 2
call fcn.004d459c
xor ecx, ecx
mov dword [ebp - 0x94], ecx
xor eax, eax
mov dword [ebp - 0xac], eax
mov word [ebp - 0x74], 8
cmp dword [ebp - 0xac], 4
jge 0x409c60
mov word [ebp - 0x74], 0xb0
xor edx, edx
mov dword [ebp - 0x3c], edx
lea ecx, [ebp - 0x3c]
inc dword [ebp - 0x68]
mov eax, dword [ebp - 0x88]
mov edx, dword [ebp - 0xac]
movzx eax, byte [eax + edx]
mov edx, 2
call fcn.0043e324
lea edx, [ebp - 0x3c]
lea eax, [ebp - 8]
call fcn.004d45e0
dec dword [ebp - 0x68]
lea eax, [ebp - 0x3c]
mov edx, 2
call fcn.004d459c
inc dword [ebp - 0xac]
cmp dword [ebp - 0xac], 4
jl 0x409c0b
lea edx, [ebp - 8]
lea eax, [ebp - 0xc]
call fcn.004d45e0
mov word [ebp - 0x74], 0xbc
xor ecx, ecx
mov dword [ebp - 0x40], ecx
lea ecx, [ebp - 0x40]
inc dword [ebp - 0x68]
lea edx, [ebp - 8]
mov eax, 0x4d6ec5
call fcn.004d4894
lea edx, [ebp - 0x40]
lea eax, [ebp - 8]
call fcn.004d45cc
dec dword [ebp - 0x68]
lea eax, [ebp - 0x40]
mov edx, 2
call fcn.004d459c
lea edx, [ebp - 0x94]
mov eax, dword [ebp - 8]
call fcn.0043e3b4
test al, al
jne 0x409ce3
mov word [ebp - 0x74], 0xc8
mov edx, 0x4d6ec8
lea eax, [ebp - 0x44]
call fcn.004d443c
inc dword [ebp - 0x68]
mov eax, dword [eax]
call fcn.0048fca4
dec dword [ebp - 0x68]
lea eax, [ebp - 0x44]
mov edx, 2
call fcn.004d459c
mov edx, str.11111111111
lea eax, [ebp - 0x4c]
call fcn.004d443c
inc dword [ebp - 0x68]
lea ecx, [ebp - 0x4c]
push ecx
mov word [ebp - 0x74], 0xd4
push dword [ebp - 0x94]
xor eax, eax
mov dword [ebp - 0x48], eax
lea edx, [ebp - 0x48]
push edx
inc dword [ebp - 0x68]
call fcn.004096a0
add esp, 8
lea eax, [ebp - 0x48]
pop edx
call fcn.004d473c
mov dword [ebp - 0x98], eax
dec dword [ebp - 0x68]
lea eax, [ebp - 0x4c]
mov edx, 2
call fcn.004d459c
dec dword [ebp - 0x68]
lea eax, [ebp - 0x48]
mov edx, 2
call fcn.004d459c
cmp dword [ebp - 0x98], 1
jne 0x409b52
mov word [ebp - 0x74], 0xe0
push dword [ebp - 0x94]
xor ecx, ecx
mov dword [ebp - 0x50], ecx
lea eax, [ebp - 0x50]
push eax
inc dword [ebp - 0x68]
call fcn.004096a0
add esp, 8
lea edx, [ebp - 0x50]
lea eax, [ebp - 4]
call fcn.004d45cc
dec dword [ebp - 0x68]
lea eax, [ebp - 0x50]
mov edx, 2
call fcn.004d459c
jmp 0x409dcb
mov word [ebp - 0x74], 0xec
push dword [ebp - 0x94]
xor ecx, ecx
mov dword [ebp - 0x54], ecx
lea eax, [ebp - 0x54]
push eax
inc dword [ebp - 0x68]
call fcn.004096a0
add esp, 8
lea edx, [ebp - 0x54]
lea eax, [ebp - 4]
call fcn.004d45cc
dec dword [ebp - 0x68]
lea eax, [ebp - 0x54]
mov edx, 2
call fcn.004d459c
push dword [ebp - 0x8c]
call sub.kernel32.dll_CloseHandle
push dword [ebp - 0x88]
call fcn.004c8c54
pop ecx
mov word [ebp - 0x74], 0xf8
mov edx, 0x4d6ee2
lea eax, [ebp - 0x10]
call fcn.004d443c
inc dword [ebp - 0x68]
mov word [ebp - 0x74], 8
mov word [ebp - 0x74], 0x104
push dword [ebp + 0xc]
mov cl, byte [ebp + 0x14]
push ecx
push dword [ebp + 0x10]
push dword [ebp - 0x90]
push dword [ebp - 4]
xor eax, eax
mov dword [ebp - 0x58], eax
lea edx, [ebp - 0x58]
push edx
inc dword [ebp - 0x68]
call fcn.00409fb0
add esp, 0x18
lea edx, [ebp - 0x58]
lea eax, [ebp - 0x10]
call fcn.004d45cc
dec dword [ebp - 0x68]
lea eax, [ebp - 0x58]
mov edx, 2
call fcn.004d459c
mov word [ebp - 0x74], 0x110
mov edx, 0x4d6ee4
lea eax, [ebp - 0x5c]
call fcn.004d443c
inc dword [ebp - 0x68]
lea edx, [ebp - 0x5c]
lea eax, [ebp - 0x10]
call fcn.004d4698
push eax
dec dword [ebp - 0x68]
lea eax, [ebp - 0x5c]
mov edx, 2
call fcn.004d459c
pop ecx
test cl, cl
je 0x409f08
mov word [ebp - 0x74], 0x11c
lea edx, [ebp - 0x10]
mov eax, dword [ebp + 8]
call fcn.004d45cc
mov eax, dword [ebp + 8]
mov word [ebp - 0x74], 0x128
push eax
dec dword [ebp - 0x68]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004d459c
dec dword [ebp - 0x68]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004d459c
dec dword [ebp - 0x68]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004d459c
dec dword [ebp - 0x68]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004d459c
dec dword [ebp - 0x68]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.004d459c
pop eax
mov word [ebp - 0x74], 0x11c
inc dword [ebp - 0x68]
mov edx, dword [ebp - 0x84]
mov dword fs:[0], edx
jmp 0x409faa
mov word [ebp - 0x74], 0x134
mov edx, str.error
lea eax, [ebp - 0x60]
call fcn.004d443c
inc dword [ebp - 0x68]
lea edx, [ebp - 0x60]
mov eax, dword [ebp + 8]
call fcn.004d45cc
mov eax, dword [ebp + 8]
mov word [ebp - 0x74], 0x140
push eax
dec dword [ebp - 0x68]
lea eax, [ebp - 0x60]
mov edx, 2
call fcn.004d459c
dec dword [ebp - 0x68]
lea eax, [ebp - 0x10]
mov edx, 2
call fcn.004d459c
dec dword [ebp - 0x68]
lea eax, [ebp - 0xc]
mov edx, 2
call fcn.004d459c
dec dword [ebp - 0x68]
lea eax, [ebp - 8]
mov edx, 2
call fcn.004d459c
dec dword [ebp - 0x68]
lea eax, [ebp - 4]
mov edx, 2
call fcn.004d459c
dec dword [ebp - 0x68]
lea eax, [ebp + 0xc]
mov edx, 2
call fcn.004d459c
pop eax
mov word [ebp - 0x74], 0x134
inc dword [ebp - 0x68]
mov edx, dword [ebp - 0x84]
mov dword fs:[0], edx
mov esp, ebp
pop ebp
ret