Function at 0x402300
Capabilities:
Allocate or change rwx memory
Check for time delay via gettickcount
Check if file exists
Encode data using xor
Execute shellcode via indirect call
Get file attributes

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x404c40
mov eax, dword fs:[0]
push eax
sub esp, 0x208
mov eax, dword [0x6b7040]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov al, byte [ebp + 0x10]
mov edi, dword [ebp + 0xc]
mov esi, dword [ebp + 8]
mov byte [ebp - 0x115], al
mov byte [ebp - 0x134], al
mov eax, dword [ebp + 0x14]
mov dword [ebp - 0x138], edi
mov dword [ebp - 0x130], eax
test edi, edi
jne 0x40235e
lea eax, [edi + 1]
jmp 0x40292c
test esi, esi
je 0x402927
push 0x104
lea eax, [ebp - 0x114]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
cmp byte [esi + 1], 0x3a
je 0x40239d
push 0
lea eax, [ebp - 0x114]
push eax
push 0x104
push esi
call dword [sym.imp.KERNEL32.dll_GetFullPathNameA]
lea esi, [ebp - 0x114]
push esi
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
cmp eax, 0xffffffff
je 0x402927
push 1
push 0x40
push 0x24
push esi
lea ecx, [ebp - 0x214]
call fcn.00401190
lea eax, [ebp - 0x15c]
mov dword [ebp - 4], 0
push eax
lea ecx, [ebp - 0x214]
call dword [sym.imp.MSVCP140.dll_public:_class_std::fpos_struct__Mbstatet____thiscall_std::basic_istream_char__struct_std::char_traits_char__::tellg_void_]
mov eax, dword [ebp - 0x154]
add eax, dword [ebp - 0x15c]
mov ecx, dword [ebp - 0x150]
adc ecx, dword [ebp - 0x158]
test ecx, ecx
jg 0x40243c
jl 0x4023fe
cmp eax, 0x1000
ja 0x40243c
lea ecx, [ebp - 0x204]
call fcn.00402ea0
test eax, eax
jne 0x402425
push eax
mov eax, dword [ebp - 0x214]
lea ecx, [ebp - 0x214]
push 2
add ecx, dword [eax + 4]
call dword [sym.imp.MSVCP140.dll_public:_void___thiscall_std::basic_ios_char__struct_std::char_traits_char__::setstate_int__bool_]
lea ecx, [ebp - 0x214]
mov esi, 4
call fcn.004015c0
mov eax, esi
jmp 0x40292c
push eax
mov dword [ebp - 0x140], ecx
call fcn.00403dad
mov ebx, eax
lea ecx, [ebp - 0x214]
add esp, 4
mov dword [ebp - 0x140], ebx
test ebx, ebx
jne 0x402477
call fcn.00402f30
lea ecx, [ebp - 0x214]
lea esi, [ebx + 3]
call fcn.004015c0
mov eax, esi
jmp 0x40292c
push 0
push 0
push 0
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::seekg_long_long___int64___int_]
mov ecx, dword [ebp - 0x154]
add ecx, dword [ebp - 0x15c]
mov eax, dword [ebp - 0x150]
adc eax, dword [ebp - 0x158]
push eax
push ecx
push ebx
lea ecx, [ebp - 0x214]
call dword [sym.imp.MSVCP140.dll_public:_class_std::basic_istream_char__struct_std::char_traits_char______thiscall_std::basic_istream_char__struct_std::char_traits_char__::read_char___long_long___int64__]
lea ecx, [ebp - 0x214]
call fcn.00402f30
mov eax, 0x5a4d
cmp word [ebx], ax
je 0x4024df
push ebx
call fcn.00403db6
add esp, 4
lea ecx, [ebp - 0x214]
mov esi, 4
call fcn.004015c0
mov eax, esi
jmp 0x40292c
mov esi, dword [ebx + 0x3c]
mov eax, 0x14c
add esi, ebx
mov dword [ebp - 0x128], esi
cmp word [esi + 4], ax
je 0x402515
push ebx
call fcn.00403db6
add esp, 4
lea ecx, [ebp - 0x214]
mov esi, 6
call fcn.004015c0
mov eax, esi
jmp 0x40292c
xor ecx, ecx
test byte [ebp - 0x130], 1
mov dword [ebp - 0x11c], ecx
je 0x402560
call dword [sym.imp.KERNEL32.dll_GetTickCount]
push eax
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_srand]
add esp, 4
call dword [sym.imp.api_ms_win_crt_utility_l1_1_0.dll_rand]
mov ecx, eax
and ecx, 0x80000fff
jns 0x40254e
dec ecx
or ecx, 0xfffff000
inc ecx
add ecx, 0x100
and ecx, 0xff80
mov dword [ebp - 0x11c], ecx
mov eax, dword [esi + 0x50]
push 0x40
push 0x3000
add eax, ecx
push eax
push dword [esi + 0x34]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
mov dword [ebp - 0x12c], esi
test esi, esi
jne 0x4025d9
mov eax, dword [ebp - 0x128]
push 0x40
push 0x3000
mov eax, dword [eax + 0x50]
add eax, dword [ebp - 0x11c]
push eax
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
mov dword [ebp - 0x12c], eax
test esi, esi
jne 0x4025d9
push ebx
call fcn.00403db6
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
lea ecx, [ebp - 0x214]
mov dword [0x6b7290], eax
mov esi, 0x80000002
call fcn.004015c0
mov eax, esi
jmp 0x40292c
mov eax, dword [ebp - 0x128]
push 0x40
push 0x3000
push dword [eax + 0x50]
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp - 0x120], eax
test eax, eax
jne 0x402635
push ebx
call fcn.00403db6
add esp, 4
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x8000
push 0
push esi
push edi
mov dword [0x6b7290], eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
lea ecx, [ebp - 0x214]
mov esi, 3
call fcn.004015c0
mov eax, esi
jmp 0x40292c
mov eax, dword [ebp - 0x11c]
test eax, eax
je 0x4026dd
shr eax, 2
xor ecx, ecx
inc eax
mov edx, 4
mov dword [ebp - 0x13c], eax
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00403dad
add esp, 4
mov dword [ebp - 0x124], eax
call dword [sym.imp.KERNEL32.dll_GetTickCount]
mov esi, dword [ebp - 0x124]
mov edi, eax
mov ebx, dword [ebp - 0x13c]
xor eax, eax
mov ecx, eax
mov dword [esi + eax*4], edi
and ecx, 0x1f
mov edx, eax
shl edx, cl
inc eax
xor edi, edx
sub edi, 0x11111111
cmp eax, ebx
jb 0x402682
mov esi, dword [ebp - 0x12c]
mov edi, dword [ebp - 0x138]
push 0
push dword [ebp - 0x11c]
push dword [ebp - 0x124]
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
add esi, dword [ebp - 0x11c]
push dword [ebp - 0x124]
mov dword [ebp - 0x12c], esi
call fcn.00403db6
mov ebx, dword [ebp - 0x140]
add esp, 4
mov esi, dword [ebp - 0x128]
push dword [esi + 0x50]
push 0
push dword [ebp - 0x120]
call sub.VCRUNTIME140.dll_memset
push 0x1000
push ebx
push dword [ebp - 0x120]
call sub.VCRUNTIME140.dll_memcpy
movzx eax, word [esi + 0x14]
xor ecx, ecx
xor edx, edx
mov dword [ebp - 0x124], ecx
add esp, 0x18
add eax, 0x2c
cmp dx, word [esi + 6]
jae 0x402769
mov edi, dword [ebp - 0x128]
add esi, eax
mov eax, dword [esi - 4]
test eax, eax
je 0x40274b
push eax
mov eax, dword [esi]
add eax, ebx
push eax
mov eax, dword [esi - 8]
add eax, dword [ebp - 0x120]
push eax
call sub.VCRUNTIME140.dll_memcpy
mov ecx, dword [ebp - 0x124]
add esp, 0xc
movzx eax, word [edi + 6]
inc ecx
add esi, 0x28
mov dword [ebp - 0x124], ecx
cmp ecx, eax
jb 0x402726
mov edi, dword [ebp - 0x138]
mov esi, dword [ebp - 0x128]
push ebx
call fcn.00403db6
mov ecx, dword [ebp - 0x120]
add esp, 4
mov eax, dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov ebx, dword [ebp - 0x12c]
mov dword [ecx], eax
mov eax, dword [sym.imp.KERNEL32.dll_GetProcAddress]
push 0
mov dword [ecx + 4], eax
mov eax, dword [ebp - 0x130]
mov dword [ecx + 8], eax
push dword [esi + 0x50]
push ecx
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x4027f2
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x8000
push 0
push dword [ebp - 0x120]
mov dword [0x6b7290], eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
sub ebx, dword [ebp - 0x11c]
push 0x8000
push 0
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
lea ecx, [ebp - 0x214]
mov esi, 0x80000003
call fcn.004015c0
mov eax, esi
jmp 0x40292c
push 0x8000
push 0
push dword [ebp - 0x120]
call dword [sym.imp.KERNEL32.dll_VirtualFree]
push 0x40
push 0x3000
push 0x1000
push 0
push edi
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov esi, eax
test esi, esi
je 0x4025b7
push 0
push 0x1000
push 0x401a30
push esi
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x40286d
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x8000
push 0
push esi
push edi
mov dword [0x6b7290], eax
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
lea ecx, [ebp - 0x214]
mov esi, 0x80000003
call fcn.004015c0
mov eax, esi
jmp 0x40292c
mov al, byte [ebp - 0x130]
push 0
and al, 1
movzx eax, al
push eax
push dword [ebp - 0x134]
push ebx
push esi
push edi
call fcn.00402950
add esp, 0x18
mov dword [ebp - 0x134], eax
test eax, eax
jne 0x4028c5
push 0x8000
push eax
push esi
mov esi, dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
push edi
call esi
push 0x8000
push 0
push ebx
push edi
call esi
lea ecx, [ebp - 0x214]
mov esi, 0x80000001
call fcn.004015c0
mov eax, esi
jmp 0x40292c
cmp byte [ebp - 0x115], 0
jne 0x4028e3
push 0xffffffffffffffff
push eax
call dword [sym.imp.KERNEL32.dll_WaitForSingleObject]
push dword [ebp - 0x134]
call dword [sym.imp.KERNEL32.dll_CloseHandle]
push 0x8000
push 0
push esi
push edi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
test byte [ebp - 0x130], 2
je 0x402916
push str.kernel32.dll
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
push 0
push 0x1000
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
lea ecx, [ebp - 0x214]
xor esi, esi
call fcn.004015c0
mov eax, esi
jmp 0x40292c
mov eax, 2
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.00403dbb
mov esp, ebp
pop ebp
ret