Function at 0x405fb0
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, 8
push ebx
push ebp
push esi
mov esi, ecx
xor ebx, ebx
or ebp, 0xffffffff
push edi
cmp dword [esi + 0x48], ebx
je 0x406049
mov eax, dword [esi + 0x4c]
push eax
call fcn.004b958c
add esp, 4
mov dword [esi + 4], eax
cmp eax, ebx
jne 0x405fed
pop edi
mov dword [esi + 0x44], 8
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
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 eax, dword [esi + 4]
mov ecx, 0x5a4d
mov byte [esi + 0x1d], bl
cmp word [eax], cx
jne 0x406178
mov ecx, dword [eax + 0x3c]
add ecx, eax
cmp dword [ecx], 0x4550
jne 0x406178
mov edx, 0x20b
cmp word [ecx + 0x18], dx
jne 0x40614d
mov edx, dword [ecx + 0xa8]
mov ecx, dword [ecx + 0xac]
jmp 0x406159
mov eax, dword [esp + 0x1c]
cmp eax, ebx
jne 0x406064
pop edi
mov dword [esi + 0x44], 1
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret 8
cmp byte [eax], bl
jne 0x40607b
pop edi
mov dword [esi + 0x44], 2
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
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 0x4060ab
pop edi
mov dword [esi + 0x44], 3
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret 8
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_GetFileSize]
mov dword [esi + 0x24], eax
cmp eax, ebp
jne 0x4060d4
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, 8
ret 8
mov eax, dword [esi + 4]
cmp eax, ebx
je 0x4060e7
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 0x406114
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, 8
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 0x406004
pop edi
mov dword [esi + 0x44], 5
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret 8
mov edx, dword [ecx + 0x98]
mov ecx, dword [ecx + 0x9c]
cmp edx, ebx
je 0x406178
cmp ecx, ebx
je 0x406178
sub dword [esi + 0x24], ecx
lea ecx, [eax + edx - 1]
mov byte [esi + 0x1d], 1
cmp byte [ecx], bl
jne 0x406178
add dword [esi + 0x24], ebp
dec ecx
cmp byte [ecx], bl
je 0x406170
mov ecx, dword [esi + 0x24]
mov edx, dword [ecx + eax - 0x10]
mov dword [esi + 0x28], edx
mov edx, dword [ecx + eax - 0xc]
mov dword [esi + 0x2c], edx
mov edx, dword [ecx + eax - 8]
mov dword [esi + 0x30], edx
mov edx, dword [ecx + eax - 4]
mov dword [esi + 0x34], edx
cmp dword [esi + 0x28], 0x32812622
jne 0x406252
cmp edx, 0x32812621
jne 0x406252
mov edx, dword [esi + 0x2c]
mov edi, dword [esi + 0x30]
lea edi, [edi + edx + 0x10]
sub ecx, edi
mov byte [esi + 0x1c], 1
mov dword [esi + 0x20], edi
mov dword [esi + 8], ecx
mov dword [esi + 0x38], edx
cmp byte [esi + 0x1d], bl
je 0x40626f
mov ecx, 0x5a4d
cmp word [eax], cx
jne 0x40626f
mov edi, dword [eax + 0x3c]
add edi, eax
mov edx, 0x20b
xor ebp, ebp
cmp word [edi + 0x18], dx
jne 0x40620a
cmp dword [edi], 0x4550
mov ebp, edi
jne 0x40621e
mov dword [edi + 0xac], ebx
mov dword [edi + 0xa8], ebx
jmp 0x40621e
cmp dword [edi], 0x4550
jne 0x40621e
mov dword [edi + 0x9c], ebx
mov dword [edi + 0x98], ebx
mov edx, dword [esi + 8]
lea eax, [esp + 0x10]
push eax
mov eax, dword [esi + 4]
lea ecx, [esp + 0x18]
push ecx
push edx
push eax
call fcn.00405dd0
add esp, 0x10
test eax, eax
je 0x40626f
cmp ebp, ebx
je 0x406249
mov ecx, dword [esp + 0x10]
mov dword [ebp + 0x58], ecx
jmp 0x40626f
mov edx, dword [esp + 0x10]
mov dword [edi + 0x58], edx
jmp 0x40626f
xor eax, eax
mov dword [esi + 0x28], eax
mov dword [esi + 0x2c], eax
mov dword [esi + 0x30], eax
mov dword [esi + 0x34], eax
mov byte [esi + 0x1c], al
mov eax, dword [esi + 0x24]
mov dword [esi + 0x20], ebx
mov dword [esi + 8], eax
mov dword [esi + 0x38], ebx
mov ecx, dword [esi + 0x24]
cmp ecx, dword [esi + 0x20]
jae 0x406286
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 0x40629e
pop edi
mov dword [esi + 0x44], 6
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret 8
mov eax, dword [esi + 0x14]
mov edx, dword [esi + 0x30]
mov dword [esi + 0x18], edx
cmp eax, ebx
je 0x4062b7
push eax
call fcn.004b8a69
add esp, 4
mov dword [esi + 0x14], ebx
mov eax, dword [esi + 0x18]
push eax
call fcn.004b958c
add esp, 4
mov dword [esi + 0x14], eax
cmp eax, ebx
jne 0x4062dd
pop edi
mov dword [esi + 0x44], 7
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret 8
mov edx, dword [esi + 0x38]
add edx, dword [esi + 4]
mov ecx, dword [esi + 0x18]
add edx, dword [esi + 8]
push ecx
push edx
push eax
call fcn.004b6e40
add esp, 0xc
cmp dword [esi], ebx
jne 0x406314
push 0xf0000000
push 1
push 0x50163c
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
je 0x405fda
mov eax, dword [esi + 0x10]
lea ebp, [esi + 0x10]
cmp eax, ebx
je 0x406328
push eax
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
mov dword [ebp], ebx
mov eax, dword [0x526b6c]
mov ecx, dword [esi]
mov edi, dword [sym.imp.ADVAPI32.dll_CryptImportKey]
push ebp
push ebx
push ebx
push eax
push 0x526b18
push ecx
call edi
test eax, eax
jne 0x4063a6
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x406393
push 0xf0000000
push 1
push 0x50163c
push ebx
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x40637b
pop edi
mov dword [esi + 0x44], 0x62
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret 8
mov edx, dword [0x526b6c]
mov eax, dword [esi]
push ebp
push ebx
push ebx
push edx
push 0x526b18
push eax
call edi
test eax, eax
jne 0x4063a6
pop edi
mov dword [esi + 0x44], 9
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret 8
mov eax, dword [esi + 0xc]
lea edi, [esi + 0xc]
cmp eax, ebx
je 0x4063b9
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 0x4063e1
pop edi
mov dword [esi + 0x44], 0xa
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret 8
mov edx, dword [esi + 0x38]
add edx, dword [esi + 8]
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 0x40640d
pop edi
mov dword [esi + 0x44], 0xb
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret 8
mov edx, dword [ebp]
mov eax, dword [esi + 0x18]
mov ecx, dword [esi + 0x14]
push ebx
push ebx
mov ebx, dword [sym.imp.ADVAPI32.dll_CryptVerifySignatureA]
push edx
mov edx, dword [edi]
push eax
push ecx
push edx
call ebx
test eax, eax
jne 0x40648d
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x57
jne 0x40647a
push 0xf0000000
push 1
push 0x50163c
push 0
push esi
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextA]
test eax, eax
jne 0x406461
pop edi
mov dword [esi + 0x44], 0x80
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret 8
mov eax, dword [ebp]
mov ecx, dword [esi + 0x18]
mov edx, dword [esi + 0x14]
push 0
push 0
push eax
mov eax, dword [edi]
push ecx
push edx
push eax
call ebx
test eax, eax
jne 0x40648d
pop edi
mov dword [esi + 0x44], 0xc
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret 8
cmp byte [esp + 0x20], 0
je 0x4064d7
mov edi, dword [esp + 0x1c]
push 0x5c
push edi
call fcn.004b9510
add esp, 8
test eax, eax
je 0x4064aa
inc eax
jmp 0x4064ac
mov eax, edi
mov edx, dword [esi + 4]
mov ecx, dword [esi + 0x38]
add edx, dword [esi + 8]
push ecx
push edx
push eax
call fcn.004b9748
add esp, 0xc
test eax, eax
je 0x4064d7
pop edi
mov dword [esi + 0x44], 0xd
pop esi
pop ebp
xor al, al
pop ebx
add esp, 8
ret 8
mov eax, dword [esi + 4]
test eax, eax
je 0x4064ee
push eax
call fcn.004b8a69
add esp, 4
mov dword [esi + 4], 0
pop edi
pop esi
pop ebp
mov al, 1
pop ebx
add esp, 8
ret 8