Function at 0x1005b10
Capabilities:
Check if file exists
Get file attributes
Query or enumerate registry value
Write file on windows

Disassembly:
mov edi, edi
push ebp
mov ebp, esp
sub esp, 0x3c
push ebx
xor ebx, ebx
push esi
mov esi, dword [ebp + 8]
push edi
mov dword [ebp - 8], ebx
mov dword [ebp - 0x18], ebx
mov dword [ebp - 0x1c], ebx
mov dword [ebp - 0x10], ebx
mov byte [ebp - 1], bl
mov dword [ebp - 0x20], ebx
cmp esi, ebx
je 0x10060ce
cmp dword [ebp + 0xc], ebx
je 0x10060ce
cmp word [esi], bx
je 0x1005cfa
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
cmp eax, 0xffffffff
jne 0x1005b63
call dword [sym.imp.KERNEL32.dll_GetLastError]
jmp 0x10060d1
test eax, 0x4000
jne 0x1005b74
mov eax, 0x1777
jmp 0x10060d1
lea eax, [ebp - 0xc]
push eax
push esi
mov dword [ebp - 0xc], ebx
call dword [sym.imp.ADVAPI32.dll_QueryUsersOnEncryptedFile]
mov dword [ebp + 8], eax
cmp eax, ebx
jne 0x10060d1
mov edi, dword [sym.imp.CRYPT32.dll_CertOpenStore]
push ebx
push 0x1000
push ebx
push ebx
push 2
call edi
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x1005cd8
push 0x10016b8
mov esi, 0x10000
push esi
push ebx
push ebx
push 0xd
call edi
mov dword [ebp - 0x14], eax
cmp eax, ebx
je 0x1005ccb
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
mov dword [ebp - 0x28], eax
cmp eax, ebx
je 0x1005cb4
mov eax, dword [ebp - 0xc]
mov eax, dword [eax + 4]
mov ecx, dword [ebp - 0x28]
mov eax, dword [eax + ecx*4 - 4]
push ebx
push dword [eax + 8]
push esi
push ebx
push 1
push dword [ebp - 0x14]
call dword [sym.imp.CRYPT32.dll_CertFindCertificateInStore]
mov dword [ebp - 0x24], eax
cmp eax, ebx
jne 0x1005c09
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x1005ca6
push dword [ebp - 0x24]
call fcn.01003202
mov edi, eax
cmp edi, ebx
jne 0x1005c22
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x1005c9d
push 0x40
push 1
push dword [edi + 4]
lea eax, [ebp - 0x10]
push dword [edi]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1005c44
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x1005c97
lea eax, [ebp - 0x1c]
push eax
push 1
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptGetUserKey]
test eax, eax
jne 0x1005c62
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x1005c8d
push ebx
push 4
push dword [ebp - 0x24]
push dword [ebp - 8]
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
test eax, eax
jne 0x1005c80
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x1005c84
mov byte [ebp - 1], 1
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push edi
call fcn.01001b44
push dword [ebp - 0x24]
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
dec dword [ebp - 0x28]
jne 0x1005bd6
cmp byte [ebp - 1], bl
jne 0x1005cbc
push 0x2f
call fcn.01001cd8
pop ecx
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov edi, dword [ebp + 8]
jmp 0x1005ce0
push ebx
push dword [ebp - 8]
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov dword [ebp - 8], ebx
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp dword [ebp - 0xc], ebx
je 0x1005e8a
push dword [ebp - 0xc]
call dword [sym.imp.ADVAPI32.dll_FreeEncryptionCertificateHashList]
mov dword [ebp - 0xc], ebx
jmp 0x1005e8a
lea eax, [ebp - 0x20]
push eax
push 0x80000000
push ebx
push 0x1001418
push 0x80000001
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
mov edi, eax
cmp edi, ebx
jne 0x10060ca
mov edi, dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
lea eax, [ebp - 0x3c]
push eax
push ebx
lea eax, [ebp - 0x2c]
push eax
push ebx
mov esi, 0x10013f8
push esi
push dword [ebp - 0x20]
call edi
mov dword [ebp + 8], eax
cmp eax, ebx
jne 0x1005e7e
push dword [ebp - 0x3c]
call fcn.01001b24
mov dword [ebp - 0x38], eax
cmp eax, ebx
je 0x1005e7e
lea ecx, [ebp - 0x3c]
push ecx
push eax
lea eax, [ebp - 0x2c]
push eax
push ebx
push esi
push dword [ebp - 0x20]
call edi
mov dword [ebp + 8], eax
cmp eax, ebx
jne 0x1005e76
mov edi, dword [sym.imp.CRYPT32.dll_CertOpenStore]
push ebx
push 0x1000
push ebx
push ebx
push 2
call edi
mov dword [ebp - 8], eax
cmp eax, ebx
je 0x1005da3
push 0x10016b8
mov esi, 0x10000
push esi
push ebx
push ebx
push 0xd
call edi
mov dword [ebp - 0x14], eax
cmp eax, ebx
jne 0x1005db1
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x1005e76
push ebx
lea ecx, [ebp - 0x3c]
push ecx
push esi
push ebx
push 1
push eax
call dword [sym.imp.CRYPT32.dll_CertFindCertificateInStore]
mov edi, eax
cmp edi, ebx
jne 0x1005dd5
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x1005e6c
push edi
call fcn.01003202
mov esi, eax
cmp esi, ebx
jne 0x1005dec
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x1005e65
push 0x40
push 1
push dword [esi + 4]
lea eax, [ebp - 0x10]
push dword [esi]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1005e0e
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x1005e5f
lea eax, [ebp - 0x1c]
push eax
push 1
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptGetUserKey]
test eax, eax
jne 0x1005e2c
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x1005e55
push ebx
push 4
push edi
push dword [ebp - 8]
call dword [sym.imp.CRYPT32.dll_CertAddCertificateContextToStore]
test eax, eax
jne 0x1005e48
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp + 8], eax
jmp 0x1005e4c
mov byte [ebp - 1], 1
push dword [ebp - 0x1c]
call dword [sym.imp.ADVAPI32.dll_CryptDestroyKey]
push ebx
push dword [ebp - 0x10]
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push esi
call fcn.01001b44
push edi
call dword [sym.imp.CRYPT32.dll_CertFreeCertificateContext]
push ebx
push dword [ebp - 0x14]
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
push dword [ebp - 0x38]
call fcn.01001b44
push dword [ebp - 0x20]
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
mov edi, dword [ebp + 8]
cmp byte [ebp - 1], bl
je 0x10060bb
cmp dword [ebp - 8], ebx
je 0x10060ca
cmp edi, ebx
jne 0x10060bb
lea eax, [ebp + 8]
push 0x31
push eax
mov dword [ebp + 8], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0x28], ebx
mov dword [ebp - 0x24], ebx
call fcn.01001a02
mov edi, eax
pop ecx
pop ecx
cmp edi, ebx
jne 0x1005f04
lea eax, [ebp - 0x14]
push 0x34
push eax
call fcn.01001a02
mov edi, eax
pop ecx
pop ecx
cmp edi, ebx
jne 0x1005f04
push 0x40001
push dword [ebp - 0x14]
push dword [ebp + 8]
push ebx
call dword [sym.imp.USER32.dll_MessageBoxW]
mov dword [ebp - 0x24], eax
cmp eax, ebx
jne 0x1005ef7
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
push dword [ebp + 8]
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
call esi
jmp 0x1005f1d
mov esi, dword [sym.imp.KERNEL32.dll_LocalFree]
cmp dword [ebp + 8], ebx
je 0x1005f14
push dword [ebp + 8]
call esi
cmp dword [ebp - 0x14], ebx
je 0x10060bb
push dword [ebp - 0x14]
call esi
cmp dword [ebp - 0x24], 1
jne 0x10060bb
mov esi, dword [ebp + 0xc]
cmp word [esi], bx
jne 0x1005f4a
push 0x104
push esi
push 0x35
call fcn.01003313
test eax, eax
je 0x1005f4a
xor eax, eax
mov word [esi], ax
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
inc eax
inc eax
cmp cx, bx
jne 0x1005f4f
sub eax, edx
sar eax, 1
mov dword [ebp - 0x28], eax
cmp word [esi], bx
je 0x10060b0
cmp eax, 4
jbe 0x1005f99
mov edi, 0x10016ac
lea eax, [esi + eax*2 - 8]
push edi
push eax
call dword [sym.imp.msvcrt.dll__wcsicmp]
pop ecx
pop ecx
test eax, eax
je 0x1005fad
mov eax, dword [ebp - 0x28]
cmp eax, 0xff
ja 0x1005f92
push edi
jmp 0x1005f9e
xor eax, eax
mov word [esi], ax
jmp 0x1005fad
push 0x10016ac
mov ecx, dword [ebp + 0x10]
sub ecx, eax
push ecx
lea eax, [esi + eax*2]
push eax
call fcn.01001b6a
cmp word [esi], bx
je 0x10060b0
lea eax, [ebp - 0x18]
push eax
call fcn.01004dab
test eax, eax
je 0x10060a6
xor eax, eax
push 7
lea edi, [ebp - 0x34]
stosd dword es:[edi], eax
push ebx
push dword [ebp - 0x18]
stosd dword es:[edi], eax
mov edi, dword [sym.imp.CRYPT32.dll_PFXExportCertStoreEx]
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 8]
call edi
test eax, eax
je 0x100608f
push dword [ebp - 0x34]
call fcn.01001b24
mov dword [ebp - 0x30], eax
cmp eax, ebx
je 0x1006082
push 7
push ebx
push dword [ebp - 0x18]
lea eax, [ebp - 0x34]
push eax
push dword [ebp - 8]
call edi
test eax, eax
je 0x1006068
push ebx
push 0x80
push 2
push ebx
push ebx
push 0x40000000
push esi
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x1006068
push ebx
lea eax, [ebp - 0x28]
push eax
push dword [ebp - 0x34]
push dword [ebp - 0x30]
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x1006055
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x33
mov edi, eax
call fcn.01001cd8
jmp 0x100605e
push 0x32
call fcn.01001cd8
xor edi, edi
pop ecx
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1006078
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x33
mov edi, eax
call fcn.01001cd8
pop ecx
push dword [ebp - 0x30]
call fcn.01001b44
jmp 0x1006097
push 8
pop edi
push 0x33
call fcn.01001cd8
pop ecx
jmp 0x1006097
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
cmp dword [ebp - 0x18], ebx
je 0x10060bb
push dword [ebp - 0x18]
call fcn.01001b44
jmp 0x10060bb
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
jmp 0x10060bb
push 0x57
pop edi
push 0x33
call fcn.01001cd8
pop ecx
cmp dword [ebp - 8], ebx
je 0x10060ca
push ebx
push dword [ebp - 8]
call dword [sym.imp.CRYPT32.dll_CertCloseStore]
mov eax, edi
jmp 0x10060d1
push 0x57
pop eax
pop edi
pop esi
pop ebx
leave
ret 0xc