Function at 0x100ae030
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
sub esp, 0x24
mov eax, dword [0x10438fc0]
xor eax, esp
mov dword [esp + 0x20], eax
push ebx
push esi
push edi
mov edi, ecx
mov eax, dword [edi + 8]
lea esi, [edi + 4]
cmp eax, 0xffffffff
jne 0x100ae082
mov dword [esi + 8], 6
mov edi, dword [edi + 0xc]
test edi, edi
jle 0x100ae06e
and edi, 0xffff
or edi, 0x80070000
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret
push 2
xor ebx, ebx
push ebx
or edx, 0xffffffff
push edx
mov ecx, 0xffffffec
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
test eax, eax
jne 0x100ae0a5
mov dword [esi + 8], 0x19
jmp 0x100ae05b
mov dword [esi + 8], ebx
mov eax, dword [esi + 4]
mov dword [esp + 0x10], ebx
cmp eax, 0xffffffff
jne 0x100ae0bd
mov dword [esi + 8], 6
jmp 0x100ae0e5
push ebx
lea ecx, [esp + 0x14]
push ecx
push 0x14
lea edx, [esp + 0x24]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
neg eax
sbb eax, eax
and eax, 2
add eax, 0xfffffffe
cmp dword [esp + 0x10], 0x14
mov dword [esi + 8], eax
je 0x100ae10c
mov edi, dword [edi + 0xc]
cmp edi, ebx
jle 0x100ae06e
and edi, 0xffff
or edi, 0x80070000
mov eax, edi
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret
mov ebx, 1
cmp dword [esp + 0x28], ebx
jle 0x100ae12e
mov eax, 0x80004005
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x20]
mov dword [edi + 0x1f0], eax
mov eax, dword [esp + 0x1c]
mov dword [edi + 0x1ec], ecx
mov dword [edi + 0x90], eax
cmp dword [esp + 0x18], ebx
jg case.default.0x100ae1ae
cmp eax, 0x14
jg case.default.0x100ae1ae
push 0xffffffffffffffff
push 0xffffffffffffffea
mov ecx, 2
call fcn.10023560
test al, al
je 0x100ae05b
push 2
lea ecx, [esp + 0x14]
lea edx, [esp + 0x18]
call fcn.100235b0
mov edx, 2
cmp dword [esp + 0x10], edx
jne 0x100ae05b
movsx ecx, word [esp + 0x14]
mov eax, ecx
and eax, 0x1fff
sar ecx, 0xd
mov dword [edi + 0x18], eax
cmp ecx, 3
ja case.default.0x100ae1ae
jmp dword [ecx*4 + 0x100ae2b8]
mov dword [edi + 0x14], ebx
cmp eax, 0xa0
jl 0x100ae28b
mov byte [edi + 0x30], bl
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x14], edx
cmp eax, 0xa0
jl 0x100ae28b
mov byte [edi + 0x30], bl
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret
sub eax, edx
je 0x100ae244
sub eax, edx
je 0x100ae229
sub eax, 4
jne case.default.0x100ae1ae
mov dword [edi + 0x14], 5
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x14], 4
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x14], 3
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret
cmp eax, 4
je 0x100ae284
cmp eax, 8
jne case.default.0x100ae1ae
mov dword [edi + 0x14], 7
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret
mov dword [edi + 0x14], 6
xor eax, eax
pop edi
pop esi
pop ebx
mov ecx, dword [esp + 0x20]
xor ecx, esp
call fcn.10148524
mov esp, ebp
pop ebp
ret
mov ecx, dword [esp + 0x2c]
pop edi
pop esi
pop ebx
xor ecx, esp
mov eax, 0x8000ffff
call fcn.10148524
mov esp, ebp
pop ebp
ret