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

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x47a685
mov eax, dword fs:[0]
push eax
sub esp, 0x670
mov eax, dword [0x496684]
xor eax, ebp
mov dword [ebp - 0x10], eax
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
mov dword [ebp - 0x670], eax
mov dword [ebp - 0x66c], 0
xor ecx, ecx
push 0x206
push ecx
lea edx, [ebp - 0x63e]
mov dword [ebp - 4], 1
push edx
mov word [ebp - 0x640], cx
call fcn.004316d0
add esp, 0xc
push 0x3ff
lea eax, [ebp - 0x437]
push 0
push eax
mov byte [ebp - 0x438], 0
call fcn.004316d0
add esp, 0xc
lea ecx, [ebp - 0x640]
push ecx
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
lea eax, [ebp - 0x640]
lea esi, [ebp - 0x65c]
call fcn.00405740
push 0
lea edx, [ebp + 0xc]
push edx
or eax, 0xffffffff
mov edi, esi
mov byte [ebp - 4], 2
call fcn.004032a0
cmp dword [ebp - 0x648], 8
mov eax, dword [ebp - 0x65c]
jae 0x422dda
mov eax, esi
push 0
push 0x80
push 4
push 0
push 0
push 0x10000000
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0x664], eax
cmp eax, 0xffffffff
jne 0x422e15
mov edi, dword [ebp - 0x670]
mov eax, 0x48b2a8
mov esi, edi
call fcn.00405740
jmp 0x42320b
mov ecx, 9
mov esi, str.__xml_version_1.0__encoding_utf_8___
lea edi, [ebp - 0x38]
rep movsd dword es:[edi], dword [esi]
movsw word es:[edi], word [esi]
lea ecx, [ebp - 0x38]
movsb byte es:[edi], byte [esi]
mov dword [ebp - 0x660], 0
lea esi, [ecx + 1]
mov dl, byte [ecx]
inc ecx
test dl, dl
jne 0x422e37
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea edx, [ebp - 0x660]
push edx
sub ecx, esi
push ecx
lea ecx, [ebp - 0x38]
push ecx
push eax
call edi
mov eax, dword [ebp - 0x664]
push 0
lea edx, [ebp - 0x660]
push edx
push 0xb
push str._Exception_
push eax
call edi
mov eax, dword [ebx]
test eax, eax
je 0x422f2d
mov edi, dword [eax]
mov esi, ebx
call fcn.00423250
mov ecx, ebx
call fcn.00423b50
lea eax, [ebx + 0x7c]
mov edi, 0x10
cmp dword [eax + 0x14], edi
jb 0x422ea1
mov ecx, dword [eax]
mov dword [ebp - 0x668], ecx
jmp 0x422ea7
mov dword [ebp - 0x668], eax
cmp dword [ebx + 0x74], edi
jb 0x422eb1
mov eax, dword [ebx + 0x60]
jmp 0x422eb4
lea eax, [ebx + 0x60]
cmp dword [ebx + 0x58], edi
jb 0x422ebe
mov esi, dword [ebx + 0x44]
jmp 0x422ec1
lea esi, [ebx + 0x44]
cmp dword [ebx + 0x3c], edi
jb 0x422ecb
mov edx, dword [ebx + 0x28]
jmp 0x422ece
lea edx, [ebx + 0x28]
cmp dword [ebx + 0x20], edi
lea ecx, [ebx + 0xc]
jb 0x422ed8
mov ecx, dword [ecx]
mov edi, dword [ebp - 0x668]
push edi
push eax
push esi
push edx
push ecx
lea edx, [ebp - 0x438]
push str._ExceptionRecord_ModuleName__s__ExceptionCode__s__ExceptionDescription__s__ExceptionAddress__s__ExceptionModuleName__s____
push edx
call fcn.0042d78e
lea eax, [ebp - 0x438]
add esp, 0x1c
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x422f00
push 0
sub eax, edx
lea ecx, [ebp - 0x660]
push ecx
push eax
mov eax, dword [ebp - 0x664]
lea edx, [ebp - 0x438]
push edx
push eax
call dword [sym.imp.KERNEL32.dll_WriteFile]
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
mov esi, ebx
call fcn.00423670
mov edx, 0x10
cmp dword [ebx + 0xc8], edx
jb 0x422f49
mov ecx, dword [ebx + 0xb4]
jmp 0x422f4f
lea ecx, [ebx + 0xb4]
cmp dword [ebx + 0xac], edx
lea eax, [ebx + 0x98]
jb 0x422f5f
mov eax, dword [eax]
mov edx, dword [ebx + 0xd0]
push edx
push ecx
push eax
lea eax, [ebp - 0x438]
push str._Processor_Architecture__s__Level__s__NumberOfProcessors__d____
push eax
call fcn.0042d78e
lea eax, [ebp - 0x438]
add esp, 0x14
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x422f85
mov esi, dword [ebp - 0x664]
push 0
lea ecx, [ebp - 0x660]
push ecx
sub eax, edx
push eax
lea edx, [ebp - 0x438]
push edx
push esi
call edi
mov ecx, ebx
call fcn.00423850
cmp dword [ebx + 0x110], 0x10
lea eax, [ebx + 0xfc]
jb 0x422fc0
mov eax, dword [eax]
cmp dword [ebx + 0xf4], 8
lea ecx, [ebx + 0xe0]
jb 0x422fd1
mov ecx, dword [ecx]
mov edx, dword [ebx + 0xd4]
push eax
mov eax, dword [ebx + 0xdc]
push ecx
mov ecx, dword [ebx + 0xd8]
push eax
push ecx
push edx
lea eax, [ebp - 0x438]
push str._OperatingSystem_MajorVersion__d__MinorVersion__d__BuildNumber__d__CSDVersion__s__OSLanguage__s____
push eax
call fcn.0042d78e
lea eax, [ebp - 0x438]
add esp, 0x1c
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x423005
push 0
lea ecx, [ebp - 0x660]
push ecx
sub eax, edx
push eax
lea edx, [ebp - 0x438]
push edx
push esi
call edi
mov esi, ebx
call fcn.00423ad0
mov eax, dword [ebx + 0x130]
mov ecx, dword [ebx + 0x12c]
mov edx, dword [ebx + 0x128]
push eax
mov eax, dword [ebx + 0x124]
push ecx
mov ecx, dword [ebx + 0x120]
push edx
mov edx, dword [ebx + 0x11c]
push eax
mov eax, dword [ebx + 0x118]
push ecx
push edx
push eax
lea ecx, [ebp - 0x438]
push str._Memory_MemoryLoad__d____TotalPhys__d_MB__AvailPhys__d_MB__TotalPageFile__d_MB__AvailPageFile__d_MB__TotalVirtual__d_MB__AvailVirtual__d_MB____
push ecx
call fcn.0042d78e
lea eax, [ebp - 0x438]
add esp, 0x24
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x423077
push 0
sub eax, esi
mov esi, dword [ebp - 0x664]
lea edx, [ebp - 0x660]
push edx
push eax
lea eax, [ebp - 0x438]
push eax
push esi
call edi
push 0
lea ecx, [ebp - 0x660]
push ecx
push 9
push str._Modules_
push esi
call edi
mov ecx, dword [ebx + 0x138]
sub ecx, dword [ebx + 0x134]
mov eax, 0x30c30c31
imul ecx
sar edx, 5
mov eax, edx
shr eax, 0x1f
add eax, edx
test eax, eax
jle 0x4231b8
mov dword [ebp - 0x668], 0
mov dword [ebp - 0x66c], eax
mov eax, dword [ebp - 0x668]
add eax, dword [ebx + 0x134]
mov edi, 0x10
cmp dword [eax + 0xa0], edi
lea ecx, [eax + 0x8c]
jb 0x423103
mov ecx, dword [ecx]
lea edx, [eax + 0x70]
mov dword [ebp - 0x674], ecx
cmp dword [edx + 0x14], edi
jb 0x423113
mov edx, dword [edx]
mov dword [ebp - 0x678], edx
cmp dword [eax + 0x68], edi
jb 0x423123
mov ecx, dword [eax + 0x54]
jmp 0x423126
lea ecx, [eax + 0x54]
cmp dword [eax + 0x4c], edi
jb 0x423130
mov esi, dword [eax + 0x38]
jmp 0x423133
lea esi, [eax + 0x38]
cmp dword [eax + 0x30], edi
lea edx, [eax + 0x1c]
jb 0x42313d
mov edx, dword [edx]
cmp dword [eax + 0x14], edi
jb 0x423144
mov eax, dword [eax]
mov edi, dword [ebp - 0x674]
push edi
mov edi, dword [ebp - 0x678]
push edi
push ecx
push esi
push edx
push eax
lea eax, [ebp - 0x438]
push str._Module_FullPath__s__BaseAddress__s__Size__s__TimeStamp__s__FileVersion__s__ProductVersion__s____
push eax
call fcn.0042d78e
lea eax, [ebp - 0x438]
add esp, 0x20
lea esi, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x423173
mov edi, dword [sym.imp.KERNEL32.dll_WriteFile]
push 0
lea ecx, [ebp - 0x660]
push ecx
sub eax, esi
push eax
mov eax, dword [ebp - 0x664]
lea edx, [ebp - 0x438]
push edx
push eax
call edi
add dword [ebp - 0x668], 0xa8
dec dword [ebp - 0x66c]
jne 0x4230e2
mov esi, dword [ebp - 0x664]
push 0
lea ecx, [ebp - 0x660]
push ecx
push 0xa
push str.__Modules_
push esi
call edi
push 0
lea edx, [ebp - 0x660]
push edx
push 0xc
push str.__Exception_
push esi
call edi
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
lea eax, [ebp - 0x65c]
push eax
mov edi, 1
call fcn.004026a0
mov edi, dword [ebp - 0x670]
lea ecx, [eax + 1]
push edi
lea edx, [ebp - 0x65c]
call fcn.00401700
lea esi, [ebp - 0x65c]
mov dword [ebp - 0x66c], 1
mov byte [ebp - 4], 1
call fcn.00403600
lea esi, [ebp + 0xc]
mov byte [ebp - 4], 0
call fcn.00403600
mov eax, edi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0042ca72
mov esp, ebp
pop ebp
ret 0x20