Function at 0x10022c30
Capabilities:
Get common file path
Write file on windows

Disassembly:
sub esp, 0x558
mov eax, dword [0x1017455c]
xor eax, esp
mov dword [esp + 0x550], eax
mov eax, dword [esp + 0x55c]
push ebx
push ebp
mov ebp, dword [esp + 0x568]
push esi
xor ebx, ebx
push 0x103
lea ecx, [esp + 0x34d]
push ebx
push ecx
mov dword [esp + 0x20], eax
mov byte [esp + 0x354], bl
call fcn.10116880
add esp, 0xc
push 0x103
lea edx, [esp + 0x245]
push ebx
push edx
mov byte [esp + 0x24c], bl
call fcn.10116880
add esp, 0xc
push 0x207
lea eax, [esp + 0x1d]
push ebx
push eax
mov byte [esp + 0x24], bl
call fcn.10116880
xor eax, eax
add esp, 0xc
push 0x103
lea ecx, [esp + 0x455]
push ebx
push ecx
mov dword [esp + 0x22c], eax
mov dword [esp + 0x230], eax
mov dword [esp + 0x234], eax
mov dword [esp + 0x238], eax
mov dword [esp + 0x23c], eax
mov dword [esp + 0x240], eax
mov dword [esp + 0x244], eax
mov dword [esp + 0x248], eax
mov dword [esp + 0x1c], ebx
mov byte [esp + 0x45c], bl
call fcn.10116880
add esp, 0xc
lea esi, [esp + 0x240]
call fcn.1006aab0
mov esi, dword [sym.imp.KERNEL32.dll_lstrcatA]
cmp byte [esp + 0x240], bl
je 0x10022d54
lea eax, [esp + 0x240]
lea esp, [esp]
inc eax
cmp byte [eax], bl
jne 0x10022d30
lea edx, [esp + 0x240]
sub eax, edx
je 0x10022d54
cmp byte [esp + eax + 0x23f], 0x5c
je 0x10022d54
push 0x10149ea8
mov eax, edx
push eax
call esi
push str.vul.avs
lea ecx, [esp + 0x244]
push ecx
call esi
push 1
push ebx
lea edx, [esp + 0x18]
lea ecx, [esp + 0x248]
call fcn.10044660
add esp, 8
test eax, eax
jne 0x10022d8f
cmp dword [esp + 0x10], ebx
ja 0x10022da9
lea eax, [esp + 0x240]
call fcn.10033960
xor eax, eax
pop esi
pop ebp
pop ebx
mov ecx, dword [esp + 0x550]
xor ecx, esp
call fcn.1010d699
add esp, 0x558
ret
lea edx, [esp + 0x240]
push edx
lea eax, [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
push ebx
lea ecx, [esp + 0x1c]
call fcn.1005c340
test eax, eax
je 0x10022d8f
cmp dword [esp + 0x220], ebx
je 0x10022d8f
lea ecx, [esp + 0x450]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathA]
mov esi, dword [sym.imp.KERNEL32.dll_GetTempFileNameA]
lea edx, [esp + 0x348]
push edx
push ebx
push 0x1014d388
lea eax, [esp + 0x45c]
push eax
call esi
cmp edi, ebx
je 0x10022e19
push edi
push ebx
push 0x1014d388
lea ecx, [esp + 0x45c]
push ecx
call esi
lea edx, [esp + 0x348]
push 0x101493d8
push edx
call fcn.1010ebfe
mov esi, eax
add esp, 8
cmp esi, ebx
jne 0x10022e66
cmp byte [esp + 0x348], bl
je 0x10022e50
lea eax, [esp + 0x348]
call fcn.10033960
mov byte [esp + 0x348], bl
cmp byte [edi], bl
je 0x10022d8f
mov eax, edi
call fcn.10033960
mov byte [edi], bl
jmp 0x10022d8f
mov eax, dword [esp + 0x230]
mov ecx, dword [esp + 0x220]
push esi
push eax
push 1
push ecx
call fcn.10110b60
push esi
call fcn.1010f263
mov edx, dword [esp + 0x234]
add esp, 0x14
push edx
call fcn.1010dc10
mov ecx, dword [esp + 0x18]
mov esi, dword [sym.imp.KERNEL32.dll_lstrcpyA]
add esp, 4
lea eax, [esp + 0x348]
push eax
push ecx
mov dword [esp + 0x228], ebx
call esi
cmp ebp, ebx
je 0x10022ec2
lea edx, [esp + 0x240]
push edx
push ebp
call esi
mov ecx, dword [esp + 0x55c]
pop esi
pop ebp
pop ebx
xor ecx, esp
mov eax, 1
call fcn.1010d699
add esp, 0x558
ret