Function at 0x409d20
Capabilities:
Write file on windows

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40d246
mov eax, dword fs:[0]
push eax
sub esp, 0xbc
mov eax, dword [0x413018]
xor eax, ebp
mov dword [ebp - 0x14], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov dword [ebp - 0xc8], ecx
mov eax, 0xfeff
mov word [ebp - 0x98], ax
mov dword [ebp - 0xa0], 0xffffffff
mov byte [ebp - 0x99], 0
lea ecx, [ebp - 0x94]
call fcn.00407780
mov dword [ebp - 4], 0
lea ecx, [ebp - 0x84]
call fcn.00407780
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x74]
push ecx
call fcn.00407740
add esp, 4
mov byte [ebp - 4], 2
push 0x2000a
lea ecx, [ebp - 0x94]
call fcn.00407960
push 2
lea edx, [ebp - 0x84]
push edx
lea ecx, [ebp - 0x94]
call fcn.00407860
lea eax, [ebp - 0x99]
push eax
lea ecx, [ebp - 0x74]
push ecx
lea ecx, [ebp - 0x84]
call fcn.00407810
movzx edx, byte [ebp - 0x99]
test edx, edx
je 0x409e96
mov dword [ebp - 0xb0], 0xc
mov dword [ebp - 0xa8], 0
mov dword [ebp - 0xa4], str.D:_D_OICI_GA___BG__D_OICI_GA___AN__A_OICI_GA___AU_
push 0
lea eax, [ebp - 0xac]
push eax
push 1
mov ecx, dword [ebp - 0xa4]
push ecx
call sub.ADVAPI32.dll_ConvertStringSecurityDescriptorToSecurityDescriptorW
test eax, eax
je 0x409e50
push 0
push 0x80
push 1
lea edx, [ebp - 0xb0]
push edx
push 0
push 0x40000000
mov eax, dword [ebp - 0xc8]
add eax, 4
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xa0], eax
jmp 0x409e94
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xb4], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x74]
call fcn.00407610
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x84]
call fcn.004077f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004077f0
mov eax, dword [ebp - 0xb4]
jmp 0x40a029
jmp 0x409ebe
push 0
push 0x80
push 1
push 0
push 0
push 0x40000000
mov ecx, dword [ebp - 0xc8]
add ecx, 4
push ecx
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov dword [ebp - 0xa0], eax
cmp dword [ebp - 0xa0], 0xffffffff
jne 0x409f0b
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xb8], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x74]
call fcn.00407610
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x84]
call fcn.004077f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004077f0
mov eax, dword [ebp - 0xb8]
jmp 0x40a029
push 0
lea edx, [ebp - 0x10]
push edx
push 2
lea eax, [ebp - 0x98]
push eax
mov ecx, dword [ebp - 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x409f6f
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xbc], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x74]
call fcn.00407610
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x84]
call fcn.004077f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004077f0
mov eax, dword [ebp - 0xbc]
jmp 0x40a029
push 0
lea edx, [ebp - 0x10]
push edx
push 0x40f5a0
call dword [sym.imp.MSVCR90.dll_wcslen]
add esp, 4
lea eax, [eax + eax + 2]
push eax
push str._SESSION_
mov ecx, dword [ebp - 0xa0]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteFile]
test eax, eax
jne 0x409fdf
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [ebp - 0xc0], eax
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x74]
call fcn.00407610
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x84]
call fcn.004077f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004077f0
mov eax, dword [ebp - 0xc0]
jmp 0x40a029
mov edx, dword [ebp - 0xa0]
push edx
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov dword [ebp - 0xc4], 0
mov byte [ebp - 4], 1
lea ecx, [ebp - 0x74]
call fcn.00407610
mov byte [ebp - 4], 0
lea ecx, [ebp - 0x84]
call fcn.004077f0
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x94]
call fcn.004077f0
mov eax, dword [ebp - 0xc4]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x14]
xor ecx, ebp
call fcn.00407f30
mov esp, ebp
pop ebp
ret