Function at 0x401630
Capabilities:
Get file size
Hash data using sha256
Read file on windows

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x20
push ebx
push esi
mov esi, ecx
mov ebx, edx
mov dword [ebp - 0xc], ebx
xorps xmm0, xmm0
mov dword [ebp - 4], esi
movlpd qword [ebp - 0x18], xmm0
test esi, esi
je 0x4019dc
test ebx, ebx
je 0x4019dc
cmp dword [ebp + 8], 0
je 0x4019dc
lea eax, [ebp - 0x18]
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GetFileSizeEx]
test eax, eax
je 0x4019cd
mov ecx, dword [ebx + 0xc]
add ecx, 0x210
add ecx, dword [ebx + 4]
push edi
mov edi, dword [ebp - 0x14]
test edi, edi
jl 0x4019d3
mov edx, dword [ebp - 0x18]
jg 0x40169c
cmp edx, ecx
jbe 0x4019d3
mov ecx, 0xfffffdf8
mov eax, 0xffffffff
sub ecx, dword [ebx + 0xc]
push 0x8068
sbb eax, 0
add edx, ecx
mov dword [ebp - 0x18], edx
adc edi, eax
mov dword [ebp - 0x14], edi
call fcn.0047657a
mov ebx, eax
add esp, 4
test ebx, ebx
je 0x4019d3
mov ecx, dword [ebp - 0xc]
lea edi, [ebx + 0x68]
push 0
push 0
xorps xmm0, xmm0
mov dword [ebx], 0x6a09e667
mov eax, dword [ecx]
movlpd qword [ebp - 0x20], xmm0
push dword [ebp - 0x1c]
mov dword [ebx + 4], 0xbb67ae85
push dword [ebp - 0x20]
mov dword [ebx + 8], 0x3c6ef372
push esi
mov dword [ebx + 0xc], 0xa54ff53a
mov dword [ebx + 0x10], 0x510e527f
mov dword [ebx + 0x14], 0x9b05688c
mov dword [ebx + 0x18], 0x1f83d9ab
mov dword [ebx + 0x1c], 0x5be0cd19
mov dword [ebx + 0x20], 0
mov dword [ebx + 0x24], 0
mov dword [ebp - 8], eax
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov esi, eax
test esi, esi
je 0x40177c
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 8]
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
mov eax, dword [ebp - 8]
test esi, esi
je 0x4019c1
cmp eax, dword [ebp - 0x10]
je 0x40177f
push ebx
xor esi, esi
call fcn.0047367f
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
test esi, esi
je 0x4019c1
push 0
push eax
mov edx, edi
mov ecx, ebx
call fcn.00403980
push 0
push 4
mov edx, edi
mov dword [edi], 0
mov ecx, ebx
call fcn.00403980
mov ecx, dword [ebp - 0xc]
add esp, 0x10
mov dword [ebp - 0x10], 0
mov eax, dword [ecx]
mov ecx, dword [ecx + 4]
add eax, 4
push 0
push 0
push 0
push eax
push dword [ebp - 4]
sub ecx, eax
mov dword [ebp - 8], ecx
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov esi, eax
test esi, esi
je 0x40180f
push 0
lea eax, [ebp - 0x10]
push eax
push dword [ebp - 8]
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
mov eax, dword [ebp - 8]
test esi, esi
je 0x4019c1
cmp eax, dword [ebp - 0x10]
je 0x401812
push ebx
xor esi, esi
call fcn.0047367f
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov eax, dword [ebp - 8]
test esi, esi
je 0x4019c1
push 0
push eax
mov edx, edi
mov ecx, ebx
call fcn.00403980
xorps xmm0, xmm0
mov edx, edi
push 0
push 8
mov ecx, ebx
movq qword [edi], xmm0
call fcn.00403980
mov ecx, dword [ebp - 0xc]
add esp, 0x10
mov edi, dword [ebp - 0x18]
mov eax, 0xfffffff8
mov edx, 0xffffffff
mov ecx, dword [ecx + 4]
sub eax, ecx
sbb edx, 0
add edi, eax
mov eax, dword [ebp - 0x14]
adc eax, edx
mov dword [ebp - 0x18], edi
add ecx, 8
mov dword [ebp - 0x14], eax
xor edx, edx
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
test eax, eax
jl 0x401920
jg 0x401883
cmp edi, 0x8000
jb 0x401920
push 0
push 0
push edx
push ecx
push dword [ebp - 4]
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov esi, eax
lea edi, [ebx + 0x68]
test esi, esi
je 0x4019c1
push 0
lea eax, [ebp - 0x10]
push eax
push 0x8000
push edi
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
test esi, esi
je 0x4019c1
cmp dword [ebp - 0x10], 0x8000
jne 0x4017fb
test esi, esi
je 0x4019c1
push 0
push 0x8000
mov edx, edi
mov ecx, ebx
call fcn.00403980
mov ecx, dword [ebp - 0xc]
add esp, 8
mov edx, dword [ebp - 8]
add ecx, 0x8000
mov edi, dword [ebp - 0x18]
mov eax, dword [ebp - 0x14]
adc edx, 0
add edi, 0xffff8000
mov dword [ebp - 0xc], ecx
mov dword [ebp - 8], edx
adc eax, 0xffffffff
mov dword [ebp - 0x18], edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x1c], eax
jns 0x401875
push 0
push 0
push edx
push ecx
push dword [ebp - 4]
mov dword [ebp - 0x10], 0
call dword [sym.imp.KERNEL32.dll_SetFilePointerEx]
mov esi, eax
test esi, esi
je 0x4019c1
push 0
lea eax, [ebp - 0x10]
push eax
push edi
lea eax, [ebx + 0x68]
push eax
push dword [ebp - 4]
call dword [sym.imp.KERNEL32.dll_ReadFile]
mov esi, eax
test esi, esi
je 0x4019c1
cmp edi, dword [ebp - 0x10]
jne 0x4017fb
test esi, esi
je 0x4019c1
push 0
push dword [ebp - 0x18]
lea esi, [ebx + 0x68]
mov ecx, ebx
mov edx, esi
call fcn.00403980
push 0x200
push 0
push esi
call fcn.00467c70
push 0
push 0x200
mov edx, esi
mov ecx, ebx
call fcn.00403980
push 0
push 8
mov edx, esi
mov dword [esi], 0
mov ecx, ebx
mov dword [esi + 4], 0x6232383d
call fcn.00403980
mov edx, dword [ebp + 8]
add esp, 0x24
mov ecx, ebx
call fcn.00403a70
mov esi, 1
push ebx
call fcn.0047367f
add esp, 4
mov eax, esi
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
pop edi
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret
pop esi
xor eax, eax
pop ebx
mov esp, ebp
pop ebp
ret