Function at 0x406af0
Capabilities:
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x48
push ebx
push esi
xor eax, eax
xorps xmm0, xmm0
push edi
mov edi, ecx
mov dword [ebp - 0x2c], eax
mov dword [ebp - 8], eax
xor esi, esi
mov dword [ebp - 0x18], eax
mov dword [ebp - 0x30], eax
mov eax, dword [edi + 0x104]
mov ebx, dword [edi + 0x134]
shl eax, 6
push eax
mov dword [ebp - 0x24], edi
movlpd qword [ebp - 0x44], xmm0
mov dword [ebp - 0xc], ebx
call fcn.0040b57a
mov edx, eax
add esp, 4
mov dword [ebp - 0x10], edx
test edx, edx
jne 0x406b46
lea eax, [esi + 0xe]
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
xor ecx, ecx
mov dword [ebp - 0x28], ecx
cmp dword [edi + 0x108], ecx
jbe 0x406db8
mov eax, dword [ebp - 0x40]
mov dword [ebp - 0x1c], eax
mov eax, dword [ebp - 0x44]
mov dword [ebp - 0x20], eax
nop dword [eax]
nop word [eax + eax]
cmp dword [ebx], 0
mov dword [ebp - 0x34], 0
jbe 0x406d63
mov ecx, dword [ebp - 0xc]
add ebx, 0xc
mov dword [ebp - 0x14], ebx
nop dword [eax]
mov eax, dword [ebx - 4]
test eax, eax
jne 0x406c7c
mov eax, dword [ebp - 0x30]
mov ebx, dword [ebx]
inc eax
cmp ebx, eax
jne 0x406bb9
mov ecx, dword [edi + 0x104]
mov eax, ecx
shl eax, 4
sub eax, ecx
shl eax, 2
cmp esi, eax
jbe 0x406c18
test esi, esi
je 0x406c01
push ebx
push str.dwBlockIndex:__i_n
call fcn.0040bae2
push dword [edi + 0x104]
push str.dwBlockSizeInBytes:__i_n
call fcn.0040bae2
mov ecx, dword [ebp + 8]
lea edx, [ebp - 8]
mov ebx, dword [ebp - 0x10]
add esp, 0x10
mov eax, dword [ecx]
push 0
push edx
push esi
push dword [ebp - 0x1c]
push dword [ebp - 0x20]
push ebx
call dword [eax + 4]
mov esi, eax
mov dword [ebp - 0x2c], esi
test esi, esi
jne 0x406dcb
mov ebx, dword [ebp - 0x14]
mov ecx, dword [edi + 0x104]
mov ebx, dword [ebx]
mov eax, ebx
mul ecx
xor esi, esi
mov dword [ebp - 0x20], eax
mov dword [ebp - 0x1c], edx
imul ecx, dword [ebp - 0x18]
push dword [edi + 0x154]
mov dword [ebp - 0x30], ebx
xor ebx, ebx
add ecx, dword [edi + 0x138]
mov dword [ebp - 0x38], ecx
adc ebx, dword [edi + 0x13c]
add edi, 0x144
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [ebp - 0x38]
mov dword [edi + 8], eax
lea eax, [ebp - 8]
push edi
mov dword [edi + 0xc], ebx
mov edi, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x10]
push eax
push dword [edi + 0x104]
lea eax, [ebx + esi]
push eax
push dword [edi + 0x140]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406d9c
add esi, dword [ebp - 8]
jmp 0x406d31
cmp eax, 2
jne 0x406d3a
test esi, esi
je 0x406ca4
mov ecx, dword [ebp + 8]
lea edi, [ebp - 8]
push 0
push edi
push esi
push dword [ebp - 0x1c]
mov eax, dword [ecx]
push dword [ebp - 0x20]
push edx
call dword [eax + 4]
mov edi, dword [ebp - 0x24]
xor esi, esi
mov eax, dword [ebx]
mov ecx, dword [edi + 0x104]
inc eax
mul ecx
push dword [edi + 0x154]
mov ebx, eax
mov eax, edx
neg ebx
mov dword [ebp - 0x40], ebx
adc eax, 0
imul ecx, dword [ebp - 0x18]
neg eax
xor ebx, ebx
mov dword [ebp - 0x2c], eax
add ecx, dword [edi + 0x138]
mov dword [ebp - 0x38], ecx
adc ebx, dword [edi + 0x13c]
add edi, 0x144
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, dword [ebp - 0x38]
push edi
mov dword [edi + 8], eax
lea eax, [ebp - 8]
mov dword [edi + 0xc], ebx
mov edi, dword [ebp - 0x24]
mov ebx, dword [ebp - 0x10]
push eax
push dword [edi + 0x104]
push ebx
push dword [edi + 0x140]
call dword [sym.imp.KERNEL32.dll_ReadFile]
test eax, eax
je 0x406d9c
mov ecx, dword [ebp + 8]
lea edx, [ebp - 8]
push 0
push edx
push dword [ebp - 8]
mov eax, dword [ecx]
push dword [ebp - 0x2c]
push dword [ebp - 0x40]
push ebx
call dword [eax + 4]
mov dword [ebp - 0x2c], eax
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 0x10]
mov ebx, dword [ebp - 0x14]
mov eax, dword [ebp - 0x34]
add ebx, 8
inc eax
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x34], eax
cmp eax, dword [ecx]
jb 0x406b90
mov ebx, dword [ebp - 0xc]
mov ecx, dword [ebp - 0x28]
mov eax, dword [ebx]
test eax, eax
je 0x406d63
lea ebx, [ebx + eax*8]
add ebx, 8
jmp 0x406d66
add ebx, 0x10
inc dword [ebp - 0x18]
inc ecx
mov dword [ebp - 0xc], ebx
mov dword [ebp - 0x28], ecx
cmp ecx, dword [edi + 0x108]
jb 0x406b70
mov edi, dword [ebp + 8]
test esi, esi
je 0x406dbf
mov eax, dword [edi]
lea ecx, [ebp - 8]
push 0
push ecx
push esi
push dword [ebp - 0x1c]
mov ecx, edi
push dword [ebp - 0x20]
push edx
call dword [eax + 4]
mov esi, eax
jmp 0x406dc2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push ebx
mov esi, eax
call fcn.0040b542
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4
mov edi, dword [ebp + 8]
xor esi, esi
jmp 0x406dc2
mov esi, dword [ebp - 0x2c]
mov eax, dword [edi]
mov ecx, edi
call dword [eax]
mov ebx, dword [ebp - 0x10]
push ebx
call fcn.0040b542
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 4