Function at 0x1007c4d0
Capabilities:
Check if file exists
Generate random numbers via winapi
Get common file path
Get file attributes

Disassembly:
sub esp, 0x14
mov ecx, dword [esp + 0x1c]
push ebx
push ebp
push esi
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
xor ebp, ebp
mov dword [esp + 0xc], 0
push edi
test ecx, ecx
jne 0x1007c659
mov edx, dword [esp + 0x28]
mov dword [esp + 0x18], ebp
mov dword [esp + 0x1c], ebp
mov dword [esp + 0x20], ebp
test edx, edx
jne 0x1007c57c
mov ebx, dword [sym.imp.KERNEL32.dll_GetTempPathW]
push edx
push edx
call ebx
mov edi, eax
test edi, edi
jne 0x1007c51e
call esi
jmp 0x1007c7a1
lea eax, [edi + edi]
push eax
call fcn.1015a27b
mov esi, eax
add esp, 4
test esi, esi
jne 0x1007c540
call fcn.10016659
mov dword [eax], 0xc
jmp 0x1007c7aa
push esi
push edi
call ebx
mov ecx, esi
lea edx, [ecx + 2]
nop dword [eax]
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x1007c550
sub ecx, edx
lea eax, [esp + 0x18]
sar ecx, 1
push ecx
push esi
push eax
call fcn.10080200
push esi
call fcn.1015a286
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
add esp, 0x10
jmp 0x1007c5c0
mov ecx, edx
lea edi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1007c581
sub ecx, edi
lea eax, [esp + 0x18]
push ecx
push edx
push eax
call fcn.1007fe90
add esp, 0xc
test eax, eax
js 0x1007c7aa
mov ecx, dword [esp + 0x1c]
mov eax, dword [esp + 0x18]
cmp word [eax + ecx*2 - 2], 0x2f
je 0x1007c5c0
lea eax, [esp + 0x18]
push 0x2f
push eax
call fcn.1007fdb0
add esp, 8
push dword [esp + 0x18]
mov edi, dword [sym.imp.KERNEL32.dll_GetFileAttributesW]
call edi
cmp eax, 0xffffffff
jne 0x1007c610
call esi
cmp eax, 2
je 0x1007c5df
call esi
jmp 0x1007c7a1
push dword [esp + 0x18]
call fcn.10082900
mov ebp, eax
add esp, 4
test ebp, ebp
jne 0x1007c601
call fcn.10016659
mov dword [eax], 0x16
jmp 0x1007c7aa
push ebp
call edi
cmp eax, 0xffffffff
jne 0x1007c610
call esi
jmp 0x1007c7a1
test al, 0x10
jne 0x1007c624
call fcn.10016659
mov dword [eax], 0x14
jmp 0x1007c7aa
lea eax, [esp + 0x18]
push str.libarchive_
push eax
call fcn.1007fe10
lea eax, [esp + 0x20]
push str.XXXXXXXXXX
push eax
call fcn.1007fe10
mov ecx, dword [esp + 0x28]
add esp, 0x10
mov eax, dword [esp + 0x1c]
mov dword [esp + 0x2c], ecx
lea edi, [ecx + eax*2]
lea ebx, [edi - 0x14]
jmp 0x1007c697
push 0x58
push ecx
call fcn.10028d5b
mov ebx, eax
add esp, 8
test ebx, ebx
je 0x1007c7e8
movzx eax, word [ebx]
mov edi, ebx
mov ecx, eax
cmp eax, 0x58
jne 0x1007c68e
nop word [eax + eax]
movzx eax, word [edi + 2]
add edi, 2
cmp eax, 0x58
je 0x1007c680
mov ecx, eax
test cx, cx
jne 0x1007c7e8
push 0xf0000000
push 1
push 0
push 0
lea eax, [esp + 0x20]
push eax
call dword [sym.imp.ADVAPI32.dll_CryptAcquireContextW]
test eax, eax
jne 0x1007c6b8
call esi
jmp 0x1007c7a1
mov eax, edi
sub eax, ebx
and eax, 0xfffffffe
mov dword [esp + 0x14], eax
push ebx
push eax
push dword [esp + 0x18]
mov esi, ebx
call dword [sym.imp.ADVAPI32.dll_CryptGenRandom]
test eax, eax
je 0x1007c799
cmp ebx, edi
jae 0x1007c6fb
mov ecx, 0x3e
movzx eax, word [esi]
xor edx, edx
div ecx
mov ax, word [edx*2 + str.0123456789ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz]
mov word [esi], ax
add esi, 2
cmp esi, edi
jb 0x1007c6e2
push ebp
call fcn.1015a286
mov esi, dword [esp + 0x30]
push esi
call fcn.10082900
mov ebp, eax
add esp, 8
test ebp, ebp
je 0x1007c789
cmp esi, dword [esp + 0x18]
mov ecx, 0x4000100
push 0
mov eax, pe_nt_image_headers32
cmove eax, ecx
push eax
push 1
push 0
push 0
push 0xc0010000
push ebp
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov esi, eax
cmp esi, 0xffffffff
jne 0x1007c75a
mov esi, dword [sym.imp.KERNEL32.dll_GetLastError]
call esi
cmp eax, 0x50
mov eax, dword [esp + 0x14]
je 0x1007c6c3
call esi
jmp 0x1007c7a1
push 0x8002
push esi
call fcn.1001fa12
mov ebx, eax
add esp, 8
cmp ebx, 0xffffffff
jne 0x1007c7ad
mov ecx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ecx
push eax
call fcn.100823d0
add esp, 4
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
jmp 0x1007c7ad
call fcn.10016659
or ebx, 0xffffffff
mov dword [eax], 0x16
jmp 0x1007c7b1
mov ecx, dword [sym.imp.KERNEL32.dll_GetLastError]
call ecx
push eax
call fcn.100823d0
add esp, 4
or ebx, 0xffffffff
mov esi, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
test eax, eax
je 0x1007c7c2
push 0
push eax
call dword [sym.imp.ADVAPI32.dll_CryptReleaseContext]
push ebp
call fcn.1015a286
add esp, 4
cmp esi, dword [esp + 0x18]
jne 0x1007c7de
lea eax, [esp + 0x18]
push eax
call fcn.100801d0
add esp, 4
pop edi
pop esi
pop ebp
mov eax, ebx
pop ebx
add esp, 0x14
ret
call fcn.1001a3d2
int3