Function at 0x406500
Capabilities:
Get file size
Hash data via wincrypt
Hash data with md5
Initialize hashing via wincrypt
Parse pe header
Read file on windows

Disassembly:
sub esp, 0x18
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
or ebp, 0xffffffff
push edi
cmp dword [esi + 0x48], ebx
je 0x40659c
mov eax, dword [esi + 0x4c]
push eax
call fcn.004b958c
add esp, 4
mov dword [esi + 4], eax
cmp eax, ebx
jne 0x40653d
pop edi
mov dword [esi + 0x44], 8
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
mov ecx, dword [esi + 0x4c]
mov edx, dword [esi + 0x48]
push ecx
push edx
push eax
call fcn.004b6e40
mov eax, dword [esi + 0x4c]
add esp, 0xc
mov dword [esi + 0x24], eax
mov edx, dword [esi + 4]
mov eax, 0x5a4d
mov byte [esi + 0x1d], bl
mov byte [esi + 0x1e], bl
cmp word [edx], ax
jne 0x4066d8
mov eax, dword [edx + 0x3c]
add eax, edx
cmp dword [eax], 0x4550
jne 0x4066d8
mov ecx, 0x20b
cmp word [eax + 0x18], cx
jne 0x4066a0
mov ecx, dword [eax + 0xa8]
mov edi, dword [eax + 0xac]
jmp 0x4066ac
mov eax, dword [esp + 0x2c]
cmp eax, ebx
jne 0x4065b7
pop edi
mov dword [esi + 0x44], 1
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
cmp byte [eax], bl
jne 0x4065ce
pop edi
mov dword [esi + 0x44], 2
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
push ebx
push 0x80
push 3
push ebx
push 3
push closesocket
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov edi, eax
cmp edi, ebp
jne 0x4065fe
pop edi
mov dword [esi + 0x44], 3
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x24], eax
cmp eax, ebp
jne 0x406627
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [esi + 0x44], 0x21
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x40663a
push eax
call fcn.004b8a69
add esp, 4
mov dword [esi + 4], ebx
mov ecx, dword [esi + 0x24]
push ecx
call fcn.004b958c
add esp, 4
mov dword [esi + 4], eax
cmp eax, ebx
jne 0x406667
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
pop edi
mov dword [esi + 0x44], 4
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
mov ecx, dword [esi + 0x24]
push ebx
lea edx, [esp + 0x14]
push edx
push ecx
push eax
push edi
call dword [sym.imp.KERNEL32.dll_ReadFile]
push edi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov edx, dword [esp + 0x10]
cmp edx, dword [esi + 0x24]
je 0x406554
pop edi
mov dword [esi + 0x44], 5
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
mov ecx, dword [eax + 0x98]
mov edi, dword [eax + 0x9c]
cmp dword [eax + 0x58], ebx
setne al
mov byte [esi + 0x1e], al
cmp ecx, ebx
je 0x4066d8
cmp edi, ebx
je 0x4066d8
sub dword [esi + 0x24], edi
lea eax, [edx + ecx - 1]
mov byte [esi + 0x1d], 1
cmp byte [eax], bl
jne 0x4066d8
lea esp, [esp]
add dword [esi + 0x24], ebp
dec eax
cmp byte [eax], bl
je 0x4066d0
mov edi, dword [esi + 0x24]
mov ecx, dword [edi + edx - 0x10]
mov dword [esi + 0x28], ecx
mov eax, dword [edi + edx - 0xc]
mov dword [esi + 0x2c], eax
mov ecx, dword [edi + edx - 8]
mov dword [esi + 0x30], ecx
mov eax, dword [edi + edx - 4]
mov dword [esi + 0x34], eax
cmp dword [esi + 0x28], 0x32812622
jne 0x406816
cmp eax, 0x32812621
jne 0x406816
mov ecx, dword [esi + 0x2c]
mov eax, dword [esi + 0x30]
lea ebp, [eax + ecx + 0x10]
mov eax, edi
sub eax, ebp
mov dword [esi + 0x38], ecx
xor ecx, ecx
mov dword [esi + 0x20], ebp
mov byte [esi + 0x1c], 1
mov dword [esi + 8], eax
mov ebp, ecx
mov dword [esp + 0x20], ecx
cmp eax, 0x10
jbe 0x40674b
mov ebx, dword [eax + edx - 8]
mov ecx, dword [eax + edx - 0x10]
mov ebp, dword [eax + edx - 0xc]
mov dword [esp + 0x20], ebx
mov ebx, dword [eax + edx - 4]
cmp ecx, 0x32812624
jne 0x406786
cmp ebx, 0x32812623
jne 0x406786
sub edi, dword [esi + 0x20]
mov eax, dword [esp + 0x20]
mov dword [esi + 0x28], ecx
mov dword [esi + 0x2c], ebp
mov dword [esi + 0x30], eax
lea eax, [eax + ebp + 0x10]
mov ecx, edi
sub ecx, eax
mov dword [esi + 0x34], ebx
mov dword [esi + 0x24], edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x20], eax
mov dword [esi + 8], ecx
mov dword [esi + 0x38], ebp
xor ebx, ebx
cmp byte [esi + 0x1d], bl
jne 0x406796
cmp byte [esi + 0x1e], bl
je 0x406833
mov eax, 0x5a4d
cmp word [edx], ax
jne 0x406833
mov edi, dword [edx + 0x3c]
add edi, edx
mov ecx, 0x20b
xor ebp, ebp
cmp word [edi + 0x18], cx
jne 0x4067ce
cmp dword [edi], 0x4550
mov ebp, edi
jne 0x4067e2
mov dword [edi + 0xac], ebx
mov dword [edi + 0xa8], ebx
jmp 0x4067e2
cmp dword [edi], 0x4550
jne 0x4067e2
mov dword [edi + 0x9c], ebx
mov dword [edi + 0x98], ebx
mov ecx, dword [esi + 8]
lea edx, [esp + 0x10]
push edx
mov edx, dword [esi + 4]
lea eax, [esp + 0x18]
push eax
push ecx
push edx
call fcn.00405dd0
add esp, 0x10
test eax, eax
je 0x406833
cmp ebp, ebx
je 0x40680d
mov eax, dword [esp + 0x10]
mov dword [ebp + 0x58], eax
jmp 0x406833
mov ecx, dword [esp + 0x10]
mov dword [edi + 0x58], ecx
jmp 0x406833
xor eax, eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov edx, dword [esi + 0x24]
mov byte [esi + 0x1c], bl
mov dword [esi + 0x20], ebx
mov dword [esi + 8], edx
mov dword [esi + 0x38], ebx
mov eax, dword [esi + 0x24]
cmp eax, dword [esi + 0x20]
jae 0x40684a
mov byte [esi + 0x1c], bl
mov dword [esi + 0x20], ebx
mov dword [esi + 0x24], ebx
mov dword [esi + 8], ebx
mov dword [esi + 0x38], ebx
cmp byte [esi + 0x1c], bl
jne 0x406862
pop edi
mov dword [esi + 0x44], 6
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
mov eax, dword [esi + 0x14]
mov ecx, dword [esi + 0x30]
mov dword [esi + 0x18], ecx
cmp eax, ebx
je 0x40687b
push eax
call fcn.004b8a69
add esp, 4
mov dword [esi + 0x14], ebx
mov edx, dword [esi + 0x18]
push edx
call fcn.004b958c
add esp, 4
mov dword [esi + 0x14], eax
cmp eax, ebx
jne 0x4068a1
pop edi
mov dword [esi + 0x44], 7
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
mov edx, dword [esi + 8]
add edx, dword [esi + 4]
mov ecx, dword [esi + 0x18]
add edx, dword [esi + 0x38]
push ecx
push edx
push eax
call fcn.004b6e40
add esp, 0xc
cmp dword [esi], ebx
jne 0x4068d8
push 0xf0000000
push 1
push 0x50163c
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x40652a
mov eax, dword [esi + 0x10]
lea ebp, [esi + 0x10]
cmp eax, ebx
je 0x4068ec
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [ebp], ebx
mov eax, dword [0x526c84]
mov ecx, dword [esi]
mov edi, dword [sym.imp.ADVAPI32.dll_CryptImportKey]
push ebp
push ebx
push ebx
push eax
push 0x526b70
push ecx
call edi
test eax, eax
jne 0x40696a
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x406957
push 0xf0000000
push 1
push 0x50163c
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x40693f
pop edi
mov dword [esi + 0x44], 0x62
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
mov edx, dword [0x526c84]
mov eax, dword [esi]
push ebp
push ebx
push ebx
push edx
push 0x526b70
push eax
call edi
test eax, eax
jne 0x40696a
pop edi
mov dword [esi + 0x44], 9
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
mov eax, dword [esi + 0xc]
lea edi, [esi + 0xc]
cmp eax, ebx
je 0x40697d
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyHash]
mov dword [edi], ebx
mov ecx, dword [esi]
push edi
push ebx
push ebx
push 0x8003
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptCreateHash]
test eax, eax
jne 0x4069a5
pop edi
mov dword [esi + 0x44], 0xa
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
mov edx, dword [esi + 8]
add edx, dword [esi + 0x38]
mov eax, dword [esi + 4]
mov ecx, dword [edi]
push ebx
push edx
push eax
push ecx
call dword [sym.imp.ADVAPI32.dll_CryptHashData]
test eax, eax
jne 0x4069d1
pop edi
mov dword [esi + 0x44], 0xb
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
mov edx, dword [ebp]
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x14]
push ebx
push ebx
push edx
mov edx, dword [edi]
push eax
push ecx
push edx
call dword [sym.imp.ADVAPI32.dll_CryptVerifySignatureA]
test eax, eax
jne 0x406a50
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x406a3d
push 0xf0000000
push 1
push 0x50163c
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x406a22
pop edi
mov dword [esi + 0x44], 0x80
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
mov eax, dword [ebp]
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x14]
push ebx
push ebx
push eax
mov eax, dword [edi]
push ecx
push edx
push eax
call dword [sym.imp.ADVAPI32.dll_CryptVerifySignatureA]
test eax, eax
jne 0x406a50
pop edi
mov dword [esi + 0x44], 0xc
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
cmp byte [esp + 0x30], bl
je 0x406a99
mov edi, dword [esp + 0x2c]
push 0x5c
push edi
call fcn.004b9510
add esp, 8
cmp eax, ebx
je 0x406a6c
inc eax
jmp 0x406a6e
mov eax, edi
mov edx, dword [esi + 8]
mov ecx, dword [esi + 0x38]
add edx, dword [esi + 4]
push ecx
push edx
push eax
call fcn.004b9748
add esp, 0xc
test eax, eax
je 0x406a99
pop edi
mov dword [esi + 0x44], 0xd
pop esi
pop ebp
xor al, al
pop ebx
add esp, 0x18
ret 8
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x406aac
push eax
call fcn.004b8a69
add esp, 4
mov dword [esi + 4], ebx
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 0x18
ret 8