Function at 0x1002ebe0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
mov eax, dword [0x100a7084]
xor eax, ebp
mov dword [ebp - 4], eax
mov dword [ebp - 0x10], ecx
cmp dword [ebp + 0x10], 0
jg 0x1002ec0a
jl 0x1002ec01
cmp dword [ebp + 0xc], 0
ja 0x1002ec0a
xor eax, eax
xor edx, edx
jmp 0x1002edd7
mov eax, dword [ebp - 0x10]
cmp dword [eax + 0x38], 0
je 0x1002ec2c
mov ecx, dword [ebp + 0x10]
push ecx
mov edx, dword [ebp + 0xc]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp - 0x10]
call fcn.10012be0
jmp 0x1002edd7
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 8], ecx
mov edx, dword [ebp + 0xc]
mov eax, dword [ebp + 0x10]
mov dword [ebp - 0x34], edx
mov dword [ebp - 0x30], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x1c]
cmp dword [edx], 0
je 0x1002ec56
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x2c]
mov edx, dword [ecx]
mov dword [ebp - 0x24], edx
jmp 0x1002ec5d
mov dword [ebp - 0x24], 0
mov eax, dword [ebp - 0x24]
cdq
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
jbe 0x1002ed29
mov eax, dword [ebp - 0xc]
cmp eax, dword [ebp - 8]
jae 0x1002ec7e
lea ecx, [ebp - 0xc]
mov dword [ebp - 0x28], ecx
jmp 0x1002ec84
lea edx, [ebp - 8]
mov dword [ebp - 0x28], edx
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x38], eax
mov ecx, dword [ebp - 0x38]
mov dword [ebp - 0x3c], ecx
mov edx, dword [ebp - 0x3c]
mov eax, dword [edx]
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x10]
mov edx, dword [ecx + 0x1c]
mov eax, dword [edx]
mov dword [ebp - 0x2c], eax
mov byte [ebp - 0x11], 0
movzx ecx, byte [ebp - 0x11]
test ecx, ecx
je 0x1002ecdd
mov dword [ebp - 0x1c], 0
jmp 0x1002ecc1
mov edx, dword [ebp - 0x1c]
add edx, 1
mov dword [ebp - 0x1c], edx
mov eax, dword [ebp - 0x1c]
cmp eax, dword [ebp - 0x18]
jae 0x1002ecdb
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x2c]
add edx, dword [ebp - 0x1c]
mov al, byte [edx]
mov byte [ecx], al
jmp 0x1002ecb8
jmp 0x1002ecf1
mov ecx, dword [ebp - 0x18]
push ecx
mov edx, dword [ebp - 0x2c]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.100479d0
add esp, 0xc
mov ecx, dword [ebp + 8]
add ecx, dword [ebp - 0x18]
mov dword [ebp + 8], ecx
mov edx, dword [ebp - 8]
sub edx, dword [ebp - 0x18]
mov dword [ebp - 8], edx
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x2c]
mov edx, dword [ecx]
sub edx, dword [ebp - 0x18]
mov eax, dword [ebp - 0x10]
mov ecx, dword [eax + 0x2c]
mov dword [ecx], edx
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x1c]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x18]
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x1c]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x10]
cmp dword [ecx + 0x4c], 0
je 0x1002edc8
mov ecx, dword [ebp - 0x10]
call fcn.1002dcc0
mov dword [ebp - 0x48], 0xfff
cmp dword [ebp - 8], 0xfff
jbe 0x1002ed97
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x4c]
push eax
push 0xfff
push 1
mov ecx, dword [ebp + 8]
push ecx
call fcn.10051129
add esp, 0x10
mov dword [ebp - 0x20], eax
mov edx, dword [ebp + 8]
add edx, dword [ebp - 0x20]
mov dword [ebp + 8], edx
mov eax, dword [ebp - 8]
sub eax, dword [ebp - 0x20]
mov dword [ebp - 8], eax
cmp dword [ebp - 0x20], 0xfff
je 0x1002ed95
xor ecx, ecx
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 8]
mov edx, dword [ebp - 0x30]
sbb edx, ecx
jmp 0x1002edd7
jmp 0x1002ed45
cmp dword [ebp - 8], 0
jbe 0x1002edc8
mov edx, dword [ebp - 0x10]
mov eax, dword [edx + 0x4c]
push eax
mov ecx, dword [ebp - 8]
push ecx
push 1
mov edx, dword [ebp + 8]
push edx
call fcn.10051129
add esp, 0x10
mov dword [ebp - 0x44], eax
mov eax, dword [ebp - 8]
mov dword [ebp - 0x40], eax
mov ecx, dword [ebp - 0x40]
sub ecx, dword [ebp - 0x44]
mov dword [ebp - 8], ecx
xor edx, edx
mov eax, dword [ebp - 0x34]
sub eax, dword [ebp - 8]
mov ecx, dword [ebp - 0x30]
sbb ecx, edx
mov edx, ecx
mov ecx, dword [ebp - 4]
xor ecx, ebp
call fcn.10044f41
mov esp, ebp
pop ebp
ret 0xc