Function at 0x40ef10
Capabilities:
Read file on windows

Disassembly:
sub esp, 0x3c
push esi
mov esi, dword [esp + 0x48]
push edi
xor edi, edi
cmp esi, edi
mov dword [esp + 0x10], esi
jne 0x40ef2b
pop edi
xor eax, eax
pop esi
add esp, 0x3c
ret
push esi
call fcn.004100f0
add esp, 4
test eax, eax
jne 0x40ef3e
pop edi
pop esi
add esp, 0x3c
ret
push ebx
mov dword [esp + 0xc], edi
mov eax, dword [esi]
push ebp
mov ecx, 1
xor ebp, ebp
cmp eax, ecx
je 0x40f1cc
cmp eax, 3
je 0x40f1cc
cmp eax, 2
jne 0x40f5b1
mov eax, dword [esp + 0x50]
mov esi, dword [esi + 4]
cmp eax, ecx
mov dword [esp + 0x14], esi
mov dword [esp + 0x10], ecx
jle 0x40f5b1
lea ebx, [esp + 0x60]
dec eax
mov dword [esp + 0x50], ebx
mov dword [esp + 0x30], eax
jmp 0x40ef93
mov esi, dword [esp + 0x14]
xor edi, edi
mov eax, dword [ebx + 8]
mov ecx, eax
and ecx, 0x20000000
cmp ecx, 0x20000000
jne 0x40f0f5
and eax, 0xdfffffff
mov dword [ebx + 8], eax
mov ecx, dword [ebx]
cmp ecx, edi
je 0x40f1aa
cmp eax, 0x80000004
jne 0x40f029
mov eax, dword [ecx]
lea edx, [esp + 0x28]
push edx
push eax
call fcn.00410190
mov ecx, dword [esp + 0x30]
add esp, 8
xor edi, edi
test ecx, ecx
jbe 0x40f1aa
mov esi, eax
mov eax, dword [esi]
test eax, eax
je 0x40eff2
push eax
call fcn.0040bf50
add esp, 4
test ebp, ebp
mov dword [esp + 0x2c], 0
jne 0x40f012
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x2c]
push ecx
push edx
call fcn.0040ea20
add esp, 8
mov ebp, eax
mov eax, dword [esp + 0x2c]
inc edi
mov dword [esi], eax
mov eax, dword [esp + 0x28]
add esi, 4
cmp edi, eax
jb 0x40efe3
jmp 0x40f1aa
cmp eax, 0x80000005
jne 0x40f093
lea edx, [esp + 0x20]
push edx
push ecx
call fcn.00410190
mov eax, dword [esp + 0x28]
add esp, 8
xor esi, esi
test eax, eax
jbe 0x40f1aa
mov edi, dword [esp + 0x14]
mov eax, dword [ebx]
test eax, eax
je 0x40f061
mov eax, dword [eax]
push eax
call fcn.0040bf50
add esp, 4
test ebp, ebp
mov dword [esp + 0x24], 0
jne 0x40f07d
lea ecx, [esp + 0x24]
push ecx
push edi
call fcn.0040eac0
add esp, 8
mov ebp, eax
mov edx, dword [ebx]
mov eax, dword [esp + 0x24]
inc esi
mov dword [edx], eax
mov eax, dword [esp + 0x20]
cmp esi, eax
jb 0x40f050
jmp 0x40f1aa
push eax
call fcn.004107f0
mov edi, eax
add esp, 4
test edi, edi
je 0x40f1aa
mov edx, dword [ebx]
lea ecx, [esp + 0x40]
push ecx
mov eax, dword [edx]
push eax
call fcn.00410190
mov esi, dword [esp + 0x48]
mov edx, eax
imul esi, edi
mov ecx, esi
xor eax, eax
mov ebx, ecx
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
add esp, 8
and ecx, 3
test ebp, ebp
rep stosb byte es:[edi], al
jne 0x40f1a6
mov ecx, dword [esp + 0x14]
push esi
push edx
mov eax, dword [ecx]
call dword [eax + 0x20]
cmp esi, eax
jle 0x40f1a6
jmp 0x40f1a1
cmp eax, 0x80000004
jne 0x40f12f
mov eax, dword [ebx]
cmp eax, edi
je 0x40f10d
mov ecx, dword [eax]
push ecx
call fcn.0040bf50
add esp, 4
cmp ebp, edi
mov dword [esp + 0x1c], edi
jne 0x40f125
lea edx, [esp + 0x1c]
push edx
push esi
call fcn.0040ea20
add esp, 8
mov ebp, eax
mov eax, dword [ebx]
mov ecx, dword [esp + 0x1c]
mov dword [eax], ecx
jmp 0x40f1aa
cmp eax, 0x80000005
jne 0x40f169
mov eax, dword [ebx]
cmp eax, edi
je 0x40f147
mov edx, dword [eax]
push edx
call fcn.0040bf50
add esp, 4
cmp ebp, edi
mov dword [esp + 0x18], edi
jne 0x40f15f
lea eax, [esp + 0x18]
push eax
push esi
call fcn.0040eac0
add esp, 8
mov ebp, eax
mov ecx, dword [ebx]
mov edx, dword [esp + 0x18]
mov dword [ecx], edx
jmp 0x40f1aa
push eax
call fcn.004107f0
mov esi, eax
add esp, 4
cmp esi, edi
je 0x40f1aa
mov edx, dword [ebx]
mov ecx, esi
mov ebx, ecx
xor eax, eax
mov edi, edx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, ebx
and ecx, 3
test ebp, ebp
rep stosb byte es:[edi], al
jne 0x40f1a6
mov ecx, dword [esp + 0x14]
push esi
push edx
mov eax, dword [ecx]
call dword [eax + 0x20]
cmp esi, eax
jle 0x40f1a6
mov ebp, 1
mov ebx, dword [esp + 0x50]
mov eax, dword [esp + 0x30]
add ebx, 0xc
dec eax
mov dword [esp + 0x50], ebx
mov dword [esp + 0x30], eax
jne 0x40ef8d
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x3c
ret
mov eax, dword [esp + 0x50]
mov ebx, dword [esi + 4]
cmp eax, ecx
mov dword [esp + 0x14], ebx
mov dword [esp + 0x10], ecx
mov dword [esp + 0x40], ecx
jle 0x40f5b1
lea edi, [esp + 0x60]
mov dword [esp + 0x1c], edi
jmp 0x40f1fd
mov esi, dword [esp + 0x18]
mov ebx, dword [esp + 0x14]
mov edi, dword [esp + 0x1c]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40f5b1
mov eax, dword [edi + 8]
mov ecx, eax
and ecx, 0x20000000
cmp ecx, 0x20000000
jne 0x40f41c
and eax, 0xdfffffff
mov dword [edi + 8], eax
mov ecx, dword [edi]
test ecx, ecx
je 0x40f57d
cmp eax, 0x80000004
jne 0x40f2cf
mov eax, dword [ecx]
lea edx, [esp + 0x30]
push edx
push eax
call fcn.00410190
mov ecx, dword [esp + 0x38]
add esp, 8
xor edi, edi
test ecx, ecx
jbe 0x40f57d
mov esi, eax
mov eax, dword [esi]
test eax, eax
je 0x40f26c
push eax
call fcn.0040bf50
add esp, 4
test ebp, ebp
mov dword [esp + 0x20], 0
jne 0x40f2ac
mov eax, dword [esp + 0x18]
cmp dword [eax], 3
jne 0x40f293
lea ecx, [esp + 0x10]
lea edx, [esp + 0x20]
push ecx
push edx
push eax
call fcn.0040eb40
jmp 0x40f2a7
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x20]
push eax
push ecx
push edx
call fcn.0040e7f0
add esp, 0xc
mov ebp, eax
mov eax, dword [esp + 0x20]
mov dword [esi], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40f57d
mov eax, dword [esp + 0x30]
inc edi
add esi, 4
cmp edi, eax
jb 0x40f25d
jmp 0x40f57d
cmp eax, 0x80000005
jne 0x40f36a
lea edx, [esp + 0x34]
push edx
push ecx
call fcn.00410190
mov ecx, dword [esp + 0x3c]
add esp, 8
xor edi, edi
test ecx, ecx
jbe 0x40f57d
mov esi, eax
mov eax, dword [esi]
test eax, eax
je 0x40f307
push eax
call fcn.0040bf50
add esp, 4
test ebp, ebp
mov dword [esp + 0x24], 0
jne 0x40f347
mov eax, dword [esp + 0x18]
cmp dword [eax], 3
jne 0x40f32e
lea ecx, [esp + 0x10]
lea edx, [esp + 0x24]
push ecx
push edx
push eax
call fcn.0040edf0
jmp 0x40f342
mov edx, dword [esp + 0x14]
lea eax, [esp + 0x10]
lea ecx, [esp + 0x24]
push eax
push ecx
push edx
call fcn.0040e980
add esp, 0xc
mov ebp, eax
mov eax, dword [esp + 0x24]
mov dword [esi], eax
mov eax, dword [esp + 0x10]
test eax, eax
je 0x40f57d
mov eax, dword [esp + 0x34]
inc edi
add esi, 4
cmp edi, eax
jb 0x40f2f8
jmp 0x40f57d
push eax
call fcn.004107f0
mov edi, eax
add esp, 4
test edi, edi
je 0x40f57d
mov edx, dword [esp + 0x1c]
lea ecx, [esp + 0x44]
push ecx
mov eax, dword [edx]
mov ecx, dword [eax]
push ecx
call fcn.00410190
mov esi, dword [esp + 0x4c]
mov ebx, eax
imul esi, edi
mov ecx, esi
xor eax, eax
mov edx, ecx
mov edi, ebx
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
add esp, 8
and ecx, 3
test ebp, ebp
rep stosb byte es:[edi], al
jne 0x40f57d
mov edi, dword [esp + 0x14]
push 1
push ebp
push ebp
push edi
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov dword [esp + 0x48], eax
lea eax, [esp + 0x38]
push ebp
push eax
push esi
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f5a9
mov eax, dword [esp + 0x18]
cmp dword [eax], 3
jne 0x40f40d
mov edx, dword [eax + 0x130]
lea ecx, [eax + 0xc]
push ecx
mov ecx, dword [esp + 0x4c]
add eax, 0x2c
push edx
push eax
mov eax, dword [esp + 0x44]
push eax
push ebx
push ecx
call fcn.0040fce0
add esp, 0x18
cmp dword [esp + 0x38], esi
jge 0x40f57d
jmp 0x40f578
cmp eax, 0x80000004
jne 0x40f489
mov eax, dword [edi]
test eax, eax
je 0x40f434
mov edx, dword [eax]
push edx
call fcn.0040bf50
add esp, 4
test ebp, ebp
mov dword [esp + 0x28], 0
jne 0x40f47c
cmp dword [esi], 3
jne 0x40f467
lea eax, [esp + 0x10]
lea ecx, [esp + 0x28]
push eax
push ecx
push esi
call fcn.0040eb40
mov ecx, dword [edi]
mov edx, dword [esp + 0x34]
add esp, 0xc
mov ebp, eax
mov dword [ecx], edx
jmp 0x40f57d
lea edx, [esp + 0x10]
lea eax, [esp + 0x28]
push edx
push eax
push ebx
call fcn.0040e7f0
add esp, 0xc
mov ebp, eax
mov ecx, dword [edi]
mov edx, dword [esp + 0x28]
mov dword [ecx], edx
jmp 0x40f57d
cmp eax, 0x80000005
jne 0x40f4f6
mov eax, dword [edi]
test eax, eax
je 0x40f4a1
mov eax, dword [eax]
push eax
call fcn.0040bf50
add esp, 4
test ebp, ebp
mov dword [esp + 0x2c], 0
jne 0x40f4e9
cmp dword [esi], 3
jne 0x40f4d4
lea ecx, [esp + 0x10]
lea edx, [esp + 0x2c]
push ecx
push edx
push esi
call fcn.0040edf0
mov edx, dword [edi]
mov ebp, eax
mov eax, dword [esp + 0x38]
add esp, 0xc
mov dword [edx], eax
jmp 0x40f57d
lea eax, [esp + 0x10]
lea ecx, [esp + 0x2c]
push eax
push ecx
push ebx
call fcn.0040e980
add esp, 0xc
mov ebp, eax
mov edx, dword [edi]
mov eax, dword [esp + 0x2c]
mov dword [edx], eax
jmp 0x40f57d
push eax
call fcn.004107f0
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x40f57d
mov ecx, dword [esp + 0x1c]
xor eax, eax
mov esi, dword [ecx]
mov ecx, ebx
mov edx, ecx
mov edi, esi
shr ecx, 2
rep stosd dword es:[edi], eax
mov ecx, edx
and ecx, 3
test ebp, ebp
rep stosb byte es:[edi], al
jne 0x40f57d
mov eax, dword [esp + 0x14]
push 1
push ebp
push ebp
push eax
call dword [sym.imp.KERNEL32.dll_SetFilePointer]
mov edx, dword [esp + 0x14]
lea ecx, [esp + 0x3c]
push ebp
push ecx
push ebx
push esi
push edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x40f5a9
mov eax, dword [esp + 0x18]
cmp dword [eax], 3
jne 0x40f572
mov edx, dword [eax + 0x130]
lea ecx, [eax + 0xc]
push ecx
add eax, 0x2c
push edx
push eax
mov eax, dword [esp + 0x48]
push eax
push esi
push edi
call fcn.0040fce0
add esp, 0x18
cmp ebx, dword [esp + 0x3c]
jle 0x40f57d
mov ebp, 1
mov eax, dword [esp + 0x40]
mov edx, dword [esp + 0x1c]
mov ecx, dword [esp + 0x50]
inc eax
add edx, 0xc
cmp eax, ecx
mov dword [esp + 0x40], eax
mov dword [esp + 0x1c], edx
jl 0x40f1f1
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x3c
ret
mov dword [esp + 0x10], 0
mov eax, dword [esp + 0x10]
pop ebp
pop ebx
pop edi
pop esi
add esp, 0x3c
ret