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

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffff88
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 4], ebx
mov esi, ecx
mov dword [ebp - 8], edx
mov edi, eax
xor eax, eax
push ebp
push 0x4a6ae921
push dword fs:[eax]
mov dword fs:[eax], esp
xor ebx, ebx
lea eax, [ebp - 4]
call fcn.4a6075ac
mov eax, esi
call fcn.4a6075ac
push 0
push 0
push 3
push 0
push 1
push 0x80000000
push edi
call sub.kernel32.dll_CreateFileW_1
mov edi, eax
cmp edi, 0xffffffff
je 0x4a6ae90b
push 0
lea eax, [ebp - 0xc]
push eax
push 0x60
lea eax, [ebp - 0x78]
push eax
push edi
call sub.kernel32.dll_ReadFile_1
test eax, eax
je 0x4a6ae905
cmp dword [ebp - 0xc], 0x60
jne 0x4a6ae905
cmp dword [ebp - 0x78], 0x544c4433
jne 0x4a6ae905
lea eax, [ebp - 4]
xor ecx, ecx
mov edx, dword [ebp - 0x2c]
call fcn.4a60801c
mov ebx, dword [ebp - 0x48]
mov eax, ebx
add eax, 0xfffffffa
sub eax, 3
jae 0x4a6ae783
cmp ebx, dword [ebp - 0x44]
jne 0x4a6ae783
mov eax, dword [ebp - 0x44]
cmp eax, dword [ebp - 0x40]
jne 0x4a6ae783
cmp dword [ebp - 0x38], 0x10
jne 0x4a6ae783
cmp dword [ebp - 0x2c], 0
jle 0x4a6ae783
push 0
push 0
mov eax, dword [ebp - 0x30]
push eax
push edi
call sub.kernel32.dll_SetFilePointer_1
cmp eax, 0xffffffff
je 0x4a6ae783
lea eax, [ebp - 4]
call fcn.4a607b28
mov dword [ebp - 0x10], eax
mov ebx, dword [ebp - 4]
test ebx, ebx
je 0x4a6ae76a
sub ebx, 4
mov ebx, dword [ebx]
push 0
lea eax, [ebp - 0xc]
push eax
push ebx
mov eax, dword [ebp - 0x10]
push eax
push edi
call sub.kernel32.dll_ReadFile_1
cmp eax, 1
sbb eax, eax
inc eax
jmp 0x4a6ae785
xor eax, eax
test al, al
je 0x4a6ae79f
mov eax, dword [ebp - 4]
test eax, eax
je 0x4a6ae795
sub eax, 4
mov eax, dword [eax]
mov edx, dword [ebp - 0xc]
cmp edx, eax
sete al
jmp 0x4a6ae7a1
xor eax, eax
test al, al
je 0x4a6ae7c3
push 0x7fffffff
mov ecx, 1
mov edx, dword [ebp - 4]
mov eax, 0x4a6ae940
call fcn.4a60f4e0
test eax, eax
setg al
jmp 0x4a6ae7c5
xor eax, eax
test al, al
je 0x4a6ae7e7
push 0x7fffffff
mov ecx, 1
mov edx, dword [ebp - 4]
mov eax, 0x4a6ae95c
call fcn.4a60f4e0
test eax, eax
sete al
jmp 0x4a6ae7e9
xor eax, eax
test al, al
je 0x4a6ae80b
push 0x7fffffff
mov ecx, 1
mov edx, dword [ebp - 4]
mov eax, 0x4a6ae970
call fcn.4a60f4e0
test eax, eax
sete al
jmp 0x4a6ae80d
xor eax, eax
test al, al
je 0x4a6ae827
push 0
push 0
mov eax, dword [ebp - 0x28]
push eax
push edi
call sub.kernel32.dll_SetFilePointer_1
cmp eax, 0xffffffff
setne al
jmp 0x4a6ae829
xor eax, eax
test al, al
je 0x4a6ae84a
push 0
lea eax, [ebp - 0xc]
push eax
push 0x6000000
mov eax, dword [ebp - 8]
push eax
push edi
call sub.kernel32.dll_ReadFile_1
cmp eax, 1
sbb eax, eax
inc eax
jmp 0x4a6ae84c
xor eax, eax
test al, al
je 0x4a6ae85c
cmp dword [ebp - 0xc], 0x6000000
sete al
jmp 0x4a6ae85e
xor eax, eax
mov ebx, eax
test bl, bl
je 0x4a6ae905
mov eax, esi
xor ecx, ecx
mov edx, 0x610
call fcn.4a60801c
push 0
push edi
call sub.kernel32.dll_GetFileSize_1
mov edx, eax
mov eax, dword [esi]
test eax, eax
je 0x4a6ae88b
sub eax, 4
mov eax, dword [eax]
push 0
push 0
sub edx, eax
push edx
push edi
call sub.kernel32.dll_SetFilePointer_1
mov eax, esi
call fcn.4a607b28
mov dword [ebp - 0x18], eax
mov eax, dword [esi]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
je 0x4a6ae8b8
mov eax, dword [ebp - 0x14]
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x14], eax
push 0
lea eax, [ebp - 0xc]
push eax
mov eax, dword [ebp - 0x14]
push eax
mov eax, dword [ebp - 0x18]
push eax
push edi
call sub.kernel32.dll_ReadFile_1
test eax, eax
jne 0x4a6ae8d4
mov al, 1
jmp 0x4a6ae8e7
mov eax, dword [esi]
test eax, eax
je 0x4a6ae8df
sub eax, 4
mov eax, dword [eax]
mov edx, dword [ebp - 0xc]
cmp edx, eax
setne al
test al, al
je 0x4a6ae8ef
mov al, 1
jmp 0x4a6ae8fa
mov eax, dword [esi]
cmp dword [eax], 0x316c6163
setne al
test al, al
je 0x4a6ae905
mov eax, esi
call fcn.4a6075ac
push edi
call sub.kernel32.dll_CloseHandle_1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x4a6ae928
lea eax, [ebp - 4]
call fcn.4a6075ac
ret