Function at 0x413700
Capabilities:
Check if file exists
Copy file
Query or enumerate registry value
Write file on windows

Disassembly:
push 0xffffffffffffffff
push 0x45387b
mov eax, dword fs:[0]
push eax
mov eax, 0x4a90
call fcn.0044e2b0
mov eax, dword [0x48e050]
xor eax, esp
mov dword [esp + 0x4a88], eax
push ebx
push ebp
push esi
push edi
mov eax, dword [0x48e050]
xor eax, esp
push eax
lea eax, [esp + 0x4aa4]
mov dword fs:[0], eax
mov ecx, dword [0x49671c]
push 4
lea eax, [esp + 0x4ab8]
push eax
xor ebx, ebx
push ecx
mov dword [0x496738], 1
mov dword [esp + 0x38], 0x208
mov dword [esp + 0x24], ebx
call fcn.00413050
mov esi, eax
add esp, 0xc
mov dword [esp + 0x28], esi
cmp esi, ebx
je 0x414083
mov ebp, dword [esi]
xor edx, edx
cmp dword [ebp + 4], ebx
push esi
sete dl
mov dword [ebp + 4], edx
call fcn.004140c0
add esp, 4
test eax, eax
jne 0x41405f
push 0x1658
push ebx
push 0x4950a0
call fcn.004416b0
add esp, 0xc
push 0x103
lea edi, [ebp + 8]
push edi
lea eax, [esp + 0x3c]
push 0x104
push eax
call fcn.0043e9ba
lea ecx, [esp + 0x44]
push ecx
push str.szSavePath_:__s
call fcn.00404c20
call fcn.00413170
mov edx, dword [ebp + 0x210]
push edx
push edi
push str.processEntry__szFilePath_:__s__processEntry__deCheckssum_:__16x
call fcn.00404c20
mov eax, edi
add esp, 0x24
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
cmp cx, bx
jne 0x4137f5
sub eax, edx
sar eax, 1
je 0x41405a
mov dword [esp + 0x30], vtable.UltiFunction.0
mov dword [esp + 0x4aac], ebx
movzx ebx, byte [ebp + 0x216]
mov al, byte [ebp + 0x214]
push ebx
push str.nFileCount_:__d
mov byte [esp + 0x1f], al
mov dword [esp + 0x24], ebx
call fcn.00404c20
push 0x103
push edi
push 0x104
push 0x4950a0
call fcn.0043e9ba
add esp, 0x18
test ebx, ebx
jle 0x4138b9
lea esi, [ebp + 0x21c]
xor edi, edi
lea ecx, [ecx]
mov eax, esi
lea edx, [eax + 2]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x413865
sub eax, edx
sar eax, 1
je 0x4138a8
push 0x103
push esi
lea ecx, [esp + edi + 0x3654]
push 0x104
push ecx
call fcn.0043e9ba
push 0x103
push esi
lea edx, [edi + 0x4952a8]
push 0x104
push edx
call fcn.0043e9ba
add esp, 0x20
add edi, 0x208
add esi, 0x208
sub ebx, 1
jne 0x413860
mov bl, byte [esp + 0x17]
movzx eax, bl
push eax
push str.btType_:__d
call fcn.00404c20
add esp, 8
lea ecx, [esp + 0x20]
push ecx
push 1
push 0
push str.SOFTWAREBkav
push reloc.OLEAUT32.dll_SysReAllocString
call dword [sym.imp.ADVAPI32.dll_RegOpenKeyExW]
test eax, eax
jne 0x414049
mov ecx, dword [esp + 0x20]
lea edx, [esp + 0x2c]
push edx
lea eax, [esp + 0x240]
push eax
push 0
push 0
push str.szTempDirectory
push ecx
call dword [sym.imp.ADVAPI32.dll_RegQueryValueExW]
mov edx, dword [esp + 0x20]
push edx
mov esi, eax
call dword [sym.imp.ADVAPI32.dll_RegCloseKey]
test esi, esi
jne 0x414049
xor eax, eax
mov word [esp + 0x442], ax
lea eax, [esp + 0x23c]
lea edx, [eax + 2]
lea esp, [esp]
mov cx, word [eax]
add eax, 2
test cx, cx
jne 0x413940
sub eax, edx
sar eax, 1
je 0x414049
mov edi, dword [sym.imp.SHLWAPI.dll_StrStrIW]
push str.SafeRun
lea ecx, [esp + 0x240]
push ecx
call edi
test eax, eax
je 0x414049
lea edx, [esp + 0x23c]
push 0x5c
push edx
call fcn.00440099
add esp, 8
test eax, eax
je 0x4139a6
jmp 0x413990
inc dword [esp + 0x18]
add eax, 2
push 0x5c
push eax
call fcn.00440099
add esp, 8
test eax, eax
jne 0x413990
cmp bl, 1
je 0x413afa
cmp bl, 2
je 0x413afa
movzx eax, byte [ebp + 0x216]
push eax
push str.btType__ADD_PROCESS_TYPE_FROM_SHARE__processEntry__btReserve_2__:__d
call fcn.00404c20
lea edi, [ebp + 0x21c]
push edi
lea esi, [esp + 0x24]
call fcn.00403210
mov edx, dword [ebp + 0x210]
add esp, 0xc
xor ecx, ecx
cmp edx, dword [esp + 0x18]
push 0x104
setne cl
lea eax, [esp + 0x448]
push eax
push 0
mov esi, ecx
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jbe 0x414049
push 0x4576d8
push 0
lea ecx, [esp + 0x44c]
push ecx
call dword [sym.imp.SHLWAPI.dll_StrRStrIW]
lea edx, [esp + 0x444]
sub eax, edx
sar eax, 1
inc eax
push eax
mov eax, edx
push eax
lea ecx, [esp + 0x654]
push 0x400
push ecx
call fcn.0043e9ba
push 0x3ff
push str.SafeRunBkavSafeRunManager.exe
lea edx, [esp + 0x664]
push 0x400
push edx
call fcn.0043e4d6
add esp, 0x20
test esi, esi
jne 0x413a72
cmp byte [ebp + 0x216], 1
jbe 0x414049
push str.bOrigrinalFileChanged
call fcn.00404c20
add esp, 4
push 0x3ff
push str.__sbqShare
lea eax, [esp + 0x654]
push 0x400
push eax
call fcn.0043e4d6
push edi
push str.__s_
lea ecx, [esp + 0x1e64]
push 0x400
push ecx
call fcn.0043ed50
push 0x3ff
lea edx, [esp + 0x1e70]
push edx
lea eax, [esp + 0x674]
push 0x400
push eax
call fcn.0043e4d6
lea ecx, [esp + 0x67c]
push ecx
push str.szSRMgrPath_:_s
call fcn.00404c20
push 1
lea ebx, [esp + 0x688]
call fcn.00413390
add esp, 0x3c
jmp 0x414049
cmp dword [esp + 0x18], 2
jle 0x414049
lea edx, [esp + 0x64c]
push edx
lea ebx, [esp + 0x240]
lea esi, [esp + 0x38]
call fcn.0043adf0
mov esi, eax
push esi
lea eax, [esp + 0x650]
push eax
lea ecx, [esp + 0x3c]
push ecx
push str.szSavePath_:__s__wcFileInSR_:__s__bRedirect_:__d
call fcn.00404c20
push 0x103
mov edx, ebx
push edx
push 0x104
push 0x494e98
call fcn.0043e9ba
add esp, 0x20
test esi, esi
je 0x414049
lea eax, [esp + 0x64c]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsW]
test eax, eax
jne 0x413b6f
xor esi, esi
jmp 0x413bd0
lea ecx, [esp + 0x64c]
push ecx
lea esi, [esp + 0x1c]
call fcn.00403210
mov esi, dword [esp + 0x1c]
add esp, 4
push esi
push str.dwCurCrc_:__16x
call fcn.00404c20
add esp, 8
xor edx, edx
cmp esi, dword [ebp + 0x210]
push str..xls
setne dl
lea eax, [esp + 0x38]
push eax
mov esi, edx
call edi
test eax, eax
je 0x413bd0
lea ecx, [esp + 0x64c]
push ecx
lea edx, [esp + 0x38]
push edx
call fcn.00401220
xor ecx, ecx
add esp, 8
test eax, eax
sete cl
mov esi, ecx
mov edi, dword [esp + 0x1c]
push esi
push edi
push str.nSaveAsFile_:__d__bOrigrinalFileChanged_:__d
call fcn.00404c20
add esp, 0xc
test esi, esi
jne 0x413bef
test edi, edi
jle 0x414049
push 0x104
lea edx, [esp + 0x448]
push edx
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
jbe 0x414049
push 0x4576d8
push 0
lea eax, [esp + 0x44c]
push eax
call dword [sym.imp.SHLWAPI.dll_StrRStrIW]
lea ecx, [esp + 0x444]
sub eax, ecx
sar eax, 1
inc eax
push eax
mov edx, ecx
push edx
lea eax, [esp + 0x1654]
push 0x400
push eax
call fcn.0043e9ba
push 0x3ff
push str.SafeRunBkavSafeRunManager.exe
lea ecx, [esp + 0x1664]
push 0x400
push ecx
call fcn.0043e4d6
lea edx, [esp + 0x166c]
push edx
push str.szSRMgrPath_:__s
call fcn.00404c20
mov al, byte [esp + 0x3f]
add esp, 0x28
cmp al, 1
jne 0x413dc9
push 0x3ff
push str.__sbq
lea eax, [esp + 0x1654]
push 0x400
push eax
call fcn.0043e4d6
lea ecx, [esp + 0x165c]
push ecx
push str.szSRMgrPath_:__s
call fcn.00404c20
push 1
lea ebx, [esp + 0x1668]
call fcn.00413390
add esp, 0x1c
test eax, eax
je 0x413db0
lea edx, [esp + 0x34]
push edx
lea eax, [esp + 0x650]
push eax
push str.wcFileInSR_:__s__processEntry__szFilePath_:__s
call fcn.00404c20
mov ebp, dword [sym.imp.KERNEL32.dll_CopyFileW]
add esp, 0xc
test esi, esi
je 0x413cfc
push 0
lea ecx, [esp + 0x38]
push ecx
lea edx, [esp + 0x654]
push edx
call ebp
test edi, edi
jle 0x414049
push str.nSaveAsFile___0
call fcn.00404c20
xor edi, edi
add esp, 4
cmp dword [esp + 0x1c], edi
jle 0x414049
lea esi, [esp + 0x364c]
push esi
push edi
push str.pszSaveAsPathArry__d__:__s
call fcn.00404c20
add esp, 0xc
test esi, esi
je 0x413d9a
lea eax, [esp + 0xe4c]
push eax
lea ebx, [esp + 0x240]
call fcn.0043adf0
test eax, eax
je 0x413d9a
lea ecx, [esp + 0xe4c]
push ecx
push esi
push edi
push str.pszSaveAsPathArry__d__:__s__szDest_:__s
call fcn.00404c20
add esp, 0x10
push 0
push esi
lea edx, [esp + 0xe54]
push edx
call ebp
test eax, eax
je 0x413d86
push str.Copied_file_successful
call fcn.00404c20
add esp, 4
jmp 0x413d9a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Copied_file_failed__Last_error_:__d
call fcn.00404c20
add esp, 8
inc edi
add esi, 0x208
cmp edi, dword [esp + 0x1c]
jl 0x413d24
jmp 0x414049
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.bSave_is_FAILED__last_error_:__d
call fcn.00404c20
add esp, 8
jmp 0x414049
cmp al, 2
jne 0x414049
push str.ADD_PROCESS_TYPE_FROM_MAIL_BROWSER
call fcn.00404c20
add esp, 4
push 0x3ff
push str.__autosave
lea eax, [esp + 0x1654]
push 0x400
push eax
call fcn.0043e4d6
add esp, 0x10
test esi, esi
je 0x413f36
lea ecx, [esp + 0x34]
push ecx
push str.__s_
lea edx, [esp + 0x1e54]
push 0x400
push edx
call fcn.0043ed50
add esp, 0x10
push 0
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0x654]
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x413f22
push 0x3ff
lea edx, [esp + 0x1650]
push edx
lea eax, [esp + 0x2654]
push 0x400
push eax
call fcn.0043e9ba
push 0x3ff
lea ecx, [esp + 0x1e60]
push ecx
lea edx, [esp + 0x2664]
push 0x400
push edx
call fcn.0043e4d6
push 0
lea ebx, [esp + 0x2670]
call fcn.00413390
add esp, 0x24
push 0x3f6
lea eax, [esp + 0x38]
push eax
lea ecx, [esp + 0xe54]
push 0x400
push ecx
call fcn.0043e9ba
push 0x3f6
push str.:Zone.Identifier
lea edx, [esp + 0xe64]
push 0x400
push edx
call fcn.0043e4d6
lea eax, [esp + 0xe6c]
push eax
push str.szAdsFile_:__s
call fcn.00404c20
add esp, 0x28
push 0
push 0x80
push 1
push 0
push 1
push 0xc0000000
lea ecx, [esp + 0xe64]
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
je 0x413f36
push 0
lea edx, [esp + 0x28]
push edx
push 0x18
push str._ZoneTransfer__r_nZoneId3
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x413f36
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Copied_file_failed__Last_error_:__d
call fcn.00404c20
add esp, 8
test edi, edi
jle 0x414049
push str.nSaveAsFile___0
call fcn.00404c20
mov ebp, dword [esp + 0x20]
add esp, 4
xor edi, edi
test ebp, ebp
jle 0x414049
lea esi, [esp + 0x364c]
test esi, esi
je 0x41403a
lea eax, [esp + 0xe4c]
push eax
lea ebx, [esp + 0x240]
call fcn.0043adf0
test eax, eax
je 0x41403a
lea ecx, [esp + 0xe4c]
push ecx
push esi
push edi
push str.pszSaveAsPathArry__d__:__s__szDest_:__s
call fcn.00404c20
add esp, 0x10
push 0
push esi
lea edx, [esp + 0xe54]
push edx
call dword [sym.imp.KERNEL32.dll_CopyFileW]
test eax, eax
je 0x414026
push str.Copied_file_successful
call fcn.00404c20
add esp, 4
push esi
push str.__s_
lea eax, [esp + 0x2e54]
push 0x400
push eax
call fcn.0043ed50
push 0x3ff
lea ecx, [esp + 0x1660]
push ecx
lea edx, [esp + 0x1e64]
push 0x400
push edx
call fcn.0043e9ba
push 0x3ff
lea eax, [esp + 0x2e70]
push eax
lea ecx, [esp + 0x1e74]
push 0x400
push ecx
call fcn.0043e4d6
push 0
lea ebx, [esp + 0x1e80]
call fcn.00413390
add esp, 0x34
jmp 0x41403a
call dword [sym.imp.KERNEL32.dll_GetLastError]
push eax
push str.Copied_file_failed__Last_error_:__d
call fcn.00404c20
add esp, 8
inc edi
add esi, 0x208
cmp edi, ebp
jl 0x413f60
mov esi, dword [esp + 0x28]
mov dword [esp + 0x4aac], 0xffffffff
xor ebx, ebx
call fcn.004110d0
mov eax, dword [0x496730]
cmp eax, ebx
je 0x414081
cmp eax, 0xffffffff
je 0x414081
push eax
call dword [sym.imp.KERNEL32.dll_SetEvent]
mov edx, dword [0x496730]
push edx
call dword [sym.imp.KERNEL32.dll_ResetEvent]
mov eax, esi
mov dword [0x496738], ebx
mov ecx, dword [esp + 0x4aa4]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x4a88]
xor ecx, esp
call fcn.0043e4c7
add esp, 0x4a9c
ret