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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
mov ebx, dword [ebp + 0xc]
push esi
push edi
test ebx, ebx
je 0x1001f0a6
push ebx
call fcn.100246e0
add esp, 4
test eax, eax
je 0x1001f0a6
mov edi, dword [ebp + 0x20]
mov esi, dword [ebp + 0x18]
mov dword [ebp - 0xc], esi
test edi, edi
je 0x1001f06e
test esi, esi
jle 0x1001f0a6
mov eax, dword [ebx]
xor ecx, ecx
mov dword [ebp - 4], ecx
cmp eax, 1
jne 0x1001f26a
mov esi, dword [ebx + 4]
push eax
push ecx
push ecx
push esi
mov dword [ebp - 0x18], esi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, eax
mov dword [ebp - 8], ebx
cmp ebx, 0xffffffff
jne 0x1001f0af
mov eax, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push 0
push 0
push esi
call eax
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
jne 0x1001f0c4
push edi
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
sub ecx, ebx
mov dword [ebp - 0xc], ecx
jmp 0x1001f0c7
mov ecx, dword [ebp + 0x18]
xor ebx, ebx
mov dword [ebp - 0x3c], 0
xor eax, eax
mov dword [ebp - 0x24], ebx
xor edi, edi
mov dword [ebp - 0x34], ebx
mov dword [ebp - 0x38], edi
mov dword [ebp + 0x14], eax
mov dword [ebp - 0x20], eax
test ecx, ecx
jle 0x1001f260
mov dword [ebp - 0x10], ecx
nop
push 0x1000
call fcn.1002926f
add esp, 4
lea ecx, [ebp - 0x14]
mov esi, eax
mov eax, 0x1000
cmp dword [ebp - 0x10], eax
mov dword [ebp - 0x30], esi
cmovl eax, dword [ebp - 0x10]
push 0
push ecx
push eax
push esi
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001f1b2
mov edx, dword [ebp - 0x14]
xor eax, eax
mov dword [ebp - 0x1c], 0
test edx, edx
je 0x1001f159
mov cl, byte [eax + esi]
test cl, cl
je 0x1001f14a
cmp cl, 0x1a
je 0x1001f14a
inc eax
cmp eax, edx
jb 0x1001f137
jmp 0x1001f159
inc dword [ebp - 8]
mov edx, eax
mov dword [ebp - 0x14], edx
mov dword [ebp - 0x1c], 1
add dword [ebp + 0x14], edx
mov dword [ebp - 0x2c], edx
cmp edi, ebx
je 0x1001f170
mov dword [edi], esi
mov dword [edi + 4], edx
add edi, 8
mov dword [ebp - 0x38], edi
jmp 0x1001f186
lea eax, [ebp - 0x30]
push eax
push edi
lea ecx, [ebp - 0x3c]
call fcn.1001ed80
mov ebx, dword [ebp - 0x34]
mov edi, dword [ebp - 0x38]
mov dword [ebp - 0x24], ebx
cmp dword [ebp - 0x1c], 0
jne 0x1001f1cb
cmp dword [ebp - 0x14], 0x1000
jne 0x1001f1cb
mov eax, dword [ebp - 0x20]
sub dword [ebp - 0x10], 0x1000
add eax, 0x1000
mov dword [ebp - 0x20], eax
cmp eax, dword [ebp - 0xc]
jl 0x1001f0f0
jmp 0x1001f1cb
mov eax, dword [sym.imp.KERNEL32.dll_SetFilePointer]
push 2
push 0
push 0
push dword [ebp - 0x18]
call eax
push esi
call fcn.10029254
add esp, 4
mov ebx, dword [ebp + 0x14]
mov esi, dword [ebp - 0x3c]
test ebx, ebx
jle 0x1001f22c
lea eax, [ebx + 1]
push eax
call fcn.1001dcc0
mov ecx, dword [ebp - 8]
add esp, 4
add ecx, ebx
mov dword [ebp - 4], eax
push 0
push 0
push ecx
push dword [ebp - 0x18]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ebx, dword [ebp - 4]
cmp esi, edi
je 0x1001f21f
nop
push dword [esi + 4]
push dword [esi]
push ebx
call fcn.100259e0
push dword [esi]
add ebx, dword [esi + 4]
call fcn.10029254
add esi, 8
add esp, 0x10
cmp esi, edi
jne 0x1001f200
mov eax, dword [ebp + 0x14]
mov ecx, dword [ebp - 4]
mov esi, dword [ebp - 0x3c]
mov byte [eax + ecx], 0
test esi, esi
je 0x1001f260
mov ecx, dword [ebp - 0x24]
sub ecx, esi
mov eax, esi
and ecx, 0xfffffff8
cmp ecx, 0x1000
jb 0x1001f256
mov esi, dword [esi - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
ja 0x1001f4eb
push ecx
push esi
call fcn.10024c83
add esp, 8
mov eax, dword [ebp - 4]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
cmp eax, 2
jne 0x1001f2eb
mov ebx, dword [ebx + 4]
mov ecx, ebx
mov eax, dword [ebx]
call dword [eax + 0x14]
mov edx, dword [ebx]
mov ecx, esi
mov dword [ebp - 0x28], eax
or eax, 0xffffffff
test edi, edi
cmove ecx, eax
lea eax, [ebp - 0x2c]
push eax
lea eax, [ebp - 0x24]
push eax
push ecx
push 0
mov ecx, ebx
call dword [edx + 0x30]
xor esi, esi
test eax, eax
jle 0x1001f2b2
mov edx, dword [ebp - 0x24]
mov cl, byte [edx + esi]
test cl, cl
je 0x1001f2b2
cmp cl, 0x1a
je 0x1001f2b2
inc esi
cmp esi, eax
jl 0x1001f2a1
lea eax, [esi + 1]
push eax
call fcn.1001dcc0
mov edx, dword [ebx]
add esp, 4
mov dword [ebp - 4], eax
mov ecx, ebx
mov eax, dword [ebp - 0x28]
add eax, esi
push 0
push eax
call dword [edx + 0x18]
push esi
push dword [ebp - 0x24]
push dword [ebp - 4]
call fcn.10029130
mov ecx, dword [ebp - 4]
add esp, 0xc
mov ebx, dword [ebp + 0xc]
mov byte [esi + ecx], 0
mov eax, dword [ebx]
cmp eax, 3
jne 0x1001f4e2
mov ebx, dword [ebx + 4]
push 1
push 0
push 0
push ebx
mov dword [ebp - 0x10], ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov esi, eax
mov dword [ebp - 0x1c], esi
cmp esi, 0xffffffff
jne 0x1001f327
push 2
push 0
push 0
push ebx
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
test edi, edi
jne 0x1001f33c
push edi
push ebx
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov ecx, eax
sub ecx, esi
mov dword [ebp - 0xc], ecx
jmp 0x1001f33f
mov ecx, dword [ebp + 0x18]
xor edi, edi
mov dword [ebp - 0x48], 0
xor eax, eax
mov dword [ebp - 0x28], edi
xor ebx, ebx
mov dword [ebp - 0x40], edi
mov dword [ebp - 0x44], ebx
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x20], eax
test ecx, ecx
jle 0x1001f260
mov dword [ebp - 0x18], ecx
push 0x1000
call fcn.1002926f
add esp, 4
mov esi, eax
mov dword [ebp - 0x38], esi
push 1
push 0
push 0
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov ecx, 0x1000
mov dword [ebp - 0x2c], eax
cmp dword [ebp - 0x18], ecx
lea eax, [ebp - 8]
push 0
cmovl ecx, dword [ebp - 0x18]
push eax
push ecx
push esi
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x1001f45b
mov ecx, dword [ebp + 0xc]
mov dword [ebp - 0x24], 0
lea eax, [ecx + 0x10]
push eax
push dword [ecx + 0xc]
lea eax, [ecx + 0x34]
push eax
push dword [ebp - 8]
push esi
push dword [ebp - 0x2c]
call fcn.100237a0
mov edx, dword [ebp - 8]
add esp, 0x18
xor eax, eax
test edx, edx
je 0x1001f402
nop dword [eax]
mov cl, byte [eax + esi]
test cl, cl
je 0x1001f3f3
cmp cl, 0x1a
je 0x1001f3f3
inc eax
cmp eax, edx
jb 0x1001f3e0
jmp 0x1001f402
inc dword [ebp - 0x1c]
mov edx, eax
mov dword [ebp - 8], edx
mov dword [ebp - 0x24], 1
add dword [ebp - 0x14], edx
mov dword [ebp - 0x34], edx
cmp ebx, edi
je 0x1001f419
mov dword [ebx], esi
mov dword [ebx + 4], edx
add ebx, 8
mov dword [ebp - 0x44], ebx
jmp 0x1001f42f
lea eax, [ebp - 0x38]
push eax
push ebx
lea ecx, [ebp - 0x48]
call fcn.1001ed80
mov edi, dword [ebp - 0x40]
mov ebx, dword [ebp - 0x44]
mov dword [ebp - 0x28], edi
cmp dword [ebp - 0x24], 0
jne 0x1001f473
cmp dword [ebp - 8], 0x1000
jne 0x1001f473
mov eax, dword [ebp - 0x20]
sub dword [ebp - 0x18], 0x1000
add eax, 0x1000
mov dword [ebp - 0x20], eax
cmp eax, dword [ebp - 0xc]
jl 0x1001f366
jmp 0x1001f473
push 2
push 0
push 0
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
push esi
call fcn.10029254
add esp, 4
mov edi, dword [ebp - 0x14]
mov esi, dword [ebp - 0x48]
test edi, edi
jle 0x1001f4d2
lea eax, [edi + 1]
push eax
call fcn.1001dcc0
add esp, 4
mov dword [ebp - 4], eax
mov eax, dword [ebp - 0x1c]
add eax, edi
push 0
push 0
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edi, dword [ebp - 4]
cmp esi, ebx
je 0x1001f4c5
push dword [esi + 4]
push dword [esi]
push edi
call fcn.100259e0
push dword [esi]
add edi, dword [esi + 4]
call fcn.10029254
add esi, 8
add esp, 0x10
cmp esi, ebx
jne 0x1001f4a6
mov eax, dword [ebp - 0x14]
mov ecx, dword [ebp - 4]
mov esi, dword [ebp - 0x48]
mov byte [eax + ecx], 0
test esi, esi
je 0x1001f260
mov ecx, dword [ebp - 0x28]
jmp 0x1001f233
pop edi
pop esi
mov eax, ecx
pop ebx
mov esp, ebp
pop ebp
ret
call fcn.100290d0
int3