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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x419275
mov eax, dword fs:[0]
push eax
mov eax, 0x4240
call fcn.004145b0
mov eax, dword [0x41f2b4]
xor eax, ebp
mov dword [ebp - 0x14], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov esi, 0x104
push esi
lea eax, [ebp - 0x234]
xor ebx, ebx
push eax
mov dword [ebp - 0x4248], ebx
push dword [0x4205cc]
mov edi, ecx
mov dword [ebp - 0x423c], edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
cmp eax, ebx
je 0x407282
cmp eax, esi
jae 0x407282
mov dword [ebp - 0x4238], ebx
push ebx
push 0x80
push 3
push ebx
push 1
push 0x80000000
lea eax, [ebp - 0x234]
push eax
mov dword [ebp - 4], ebx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
cmp eax, 0xffffffff
jne 0x407046
call fcn.00406f83
jmp 0x40704e
mov dword [ebp - 0x4238], eax
xor eax, eax
cmp eax, ebx
jge 0x40707a
push 0x41bc88
push edi
call fcn.00402b78
cmp dword [ebp - 0x4238], ebx
je 0x40728d
push dword [ebp - 0x4238]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x40728d
lea eax, [ebp - 0x4240]
push eax
push dword [ebp - 0x4238]
xor edi, edi
xor esi, esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [ebp - 0x4244], eax
cmp eax, 0xffffffff
jne 0x4070a5
call fcn.00406f83
cmp eax, ebx
jl 0x4070b7
mov edi, dword [ebp - 0x4244]
mov esi, dword [ebp - 0x4240]
xor eax, eax
cmp eax, ebx
jge 0x4070e6
push 0x41bc88
push dword [ebp - 0x423c]
call fcn.00402b78
cmp dword [ebp - 0x4238], ebx
je 0x4070db
push dword [ebp - 0x4238]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x423c]
jmp 0x40728f
push 0x1fff
lea eax, [ebp - 0x4233]
push ebx
push eax
mov byte [ebp - 0x4234], bl
call fcn.0040a280
add esp, 0xc
sub edi, 0x2000
push ebx
sbb esi, ebx
lea eax, [ebp - 0x4240]
push eax
mov dword [ebp - 0x4240], esi
mov esi, dword [ebp - 0x4238]
push edi
push esi
mov dword [ebp - 0x4244], edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
cmp eax, 0xffffffff
jne 0x407139
call fcn.00406f83
cmp eax, ebx
jl 0x40713f
xor eax, eax
cmp eax, ebx
jge 0x407159
push 0x41bc88
push dword [ebp - 0x423c]
call fcn.00402b78
cmp esi, ebx
je 0x4070db
push esi
jmp 0x4070d5
push ebx
lea eax, [ebp - 0x4248]
push eax
push 0x2000
lea eax, [ebp - 0x4234]
push eax
push esi
mov dword [ebp - 0x4248], ebx
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
jne 0x407185
call fcn.00406f83
jmp 0x407187
xor eax, eax
cmp eax, ebx
jl 0x40713f
mov eax, dword [ebp + 8]
cmp eax, ebx
je 0x4071a5
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x407195
sub eax, edx
sar eax, 1
jne 0x4071f0
push 0x43
pop eax
push 0x55
mov word [ebp - 0x28], ax
pop eax
push 0x53
mov word [ebp - 0x26], ax
pop eax
push 0x54
mov word [ebp - 0x24], ax
pop eax
push 0x44
mov word [ebp - 0x22], ax
pop eax
push 0x41
mov word [ebp - 0x20], ax
pop eax
push 0x54
mov word [ebp - 0x1e], ax
pop eax
mov word [ebp - 0x1c], ax
push 0x41
pop eax
mov word [ebp - 0x1a], ax
push 0x40
pop eax
mov word [ebp - 0x18], ax
xor eax, eax
mov word [ebp - 0x16], ax
lea eax, [ebp - 0x28]
mov dword [ebp + 8], eax
xor esi, esi
mov eax, dword [ebp + 8]
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x4071f8
sub eax, edx
sar eax, 1
mov edi, eax
xor ecx, ecx
cmp edi, ebx
jle 0x407223
mov al, byte [ebp + esi - 0x4234]
mov edx, dword [ebp + 8]
inc esi
cmp al, byte [edx + ecx*2]
jne 0x407223
inc ecx
cmp ecx, edi
jl 0x40720e
cmp ecx, edi
je 0x407234
cmp esi, 0x2000
jl 0x4071f2
jmp 0x4070b7
push 0x1fff
lea eax, [ebp - 0x2233]
push ebx
push eax
mov byte [ebp - 0x2234], bl
call fcn.0040a280
mov eax, 0x2000
sub eax, esi
push eax
lea eax, [ebp + esi - 0x4234]
push eax
lea eax, [ebp - 0x2234]
push eax
call fcn.0040b550
add esp, 0x18
lea eax, [ebp - 0x2234]
push eax
push dword [ebp - 0x423c]
call fcn.004072ab
jmp 0x4070c7
push 0x41bc88
push edi
call fcn.00402b78
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.004089b6
leave
ret 4