Function at 0x402520
Capabilities:
Allocate or change rwx memory

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x40b2bd
mov eax, dword fs:[0]
push eax
sub esp, 0x89c
mov eax, dword [0x410008]
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 edi, ecx
mov edx, dword [edi + 0x418]
lea ecx, [ebp - 0x20]
xor eax, eax
mov dword [ebp - 0x18], 0
cmp dword [edi + 0x420], eax
xorps xmm0, xmm0
movq qword [ebp - 0x20], xmm0
sete al
lea eax, [eax*2 + 0x1438]
push eax
call fcn.00401220
add esp, 4
mov dword [ebp - 4], 0
mov eax, dword [ebp - 0x20]
cmp eax, dword [ebp - 0x1c]
jne 0x40259c
mov ebx, 0x14
jmp 0x4028be
push 0x430
lea eax, [ebp - 0x888]
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x46c], 1
lea ecx, [ebp - 0x884]
mov dword [ebp - 0x468], 0
call fcn.00409630
mov ecx, 0x208
lea eax, [ebp - 0x884]
nop dword [eax]
cmp word [eax], 0
je 0x4025ee
add eax, 2
sub ecx, 1
jne 0x4025e0
mov edx, 0x208
mov esi, ecx
mov eax, edx
sub eax, ecx
neg esi
sbb esi, esi
and esi, eax
test ecx, ecx
je 0x402646
lea ecx, [ebp - 0x884]
lea ecx, [ecx + esi*2]
sub edx, esi
je 0x402639
mov ebx, str.LSI___x86.dll
mov eax, 0x7ffffffe
sub ebx, ecx
nop dword [eax]
test eax, eax
je 0x402639
movzx esi, word [ebx + ecx]
test si, si
je 0x402639
mov word [ecx], si
dec eax
add ecx, 2
sub edx, 1
jne 0x402620
test edx, edx
lea eax, [ecx - 2]
cmovne eax, ecx
xor ecx, ecx
mov word [eax], cx
mov eax, dword [ebp - 0x20]
xor ebx, ebx
mov ecx, dword [ebp - 0x1c]
mov dword [ebp - 0x898], eax
mov dword [ebp - 0x89c], ecx
cmp eax, ecx
je 0x4028be
movq xmm0, qword [eax]
movq qword [ebp - 0x8a8], xmm0
mov ebx, dword [ebp - 0x8a8]
push ebx
push 0
push 0x1fffff
call dword [sym.imp.KERNEL32.dll_OpenProcess]
mov esi, eax
test esi, esi
jne 0x402698
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
lea ebx, [esi + 0x12]
jmp 0x402899
mov ecx, esi
call fcn.00409830
test al, al
je 0x402885
mov ecx, esi
call fcn.00409770
test al, al
je 0x402885
mov edx, str.LSI___x86.dll
mov ecx, esi
call fcn.00401990
mov dword [ebp - 0x88c], eax
test eax, eax
jne 0x402700
lea eax, [ebp - 0x888]
mov dword [ebp - 0x470], ebx
push eax
call sym.LSI.exe_InjectW
mov ecx, eax
test ecx, ecx
jne 0x4026f4
mov eax, dword [ebp - 0x45c]
mov dword [ebp - 0x88c], eax
test eax, eax
jne 0x402700
mov dword [edi], ecx
mov ebx, 0x16
jmp 0x402892
lea ecx, [ebp - 0x454]
mov dword [ebp - 0x454], 0
push ecx
push 0x40c480
mov edx, eax
mov ecx, esi
call fcn.00401ac0
add esp, 8
test al, al
jne 0x40273d
mov edx, dword [ebp - 0x88c]
mov ecx, esi
mov ebx, 0x1a
call fcn.00401010
jmp 0x402892
movzx eax, word [ebp - 0x8a4]
push 0x40
push 0x3000
push 0x430
push 0
push esi
mov dword [edi + 0x428], eax
call dword [sym.imp.KERNEL32.dll_VirtualAllocEx]
mov ebx, eax
mov dword [ebp - 0x890], ebx
test ebx, ebx
jne 0x40278a
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edx, dword [ebp - 0x88c]
mov ecx, esi
mov dword [edi], eax
mov ebx, 0x17
call fcn.00401010
jmp 0x402892
push 0
push 0x430
push edi
push ebx
push esi
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x4027d1
call dword [sym.imp.KERNEL32.dll_GetLastError]
push 0x8000
push 0
push dword [ebp - 0x890]
mov dword [edi], eax
mov ebx, 0x18
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov edx, dword [ebp - 0x88c]
mov ecx, esi
call fcn.00401010
jmp 0x402892
mov edx, dword [ebp - 0x454]
lea eax, [ebp - 0x14]
push eax
lea eax, [ebp - 0x894]
mov dword [edi + 0x428], 0
push eax
push 0
push 0
push ebx
mov ecx, esi
mov dword [ebp - 0x894], 0
mov dword [ebp - 0x14], 0
call fcn.00406fe0
add esp, 0x14
mov ebx, eax
lea eax, [ebp - 0x450]
push 0x430
push 0
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
lea eax, [ebp - 0x450]
push 0
push 0x430
push eax
push dword [ebp - 0x890]
push esi
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
push 0x8000
push 0
push dword [ebp - 0x890]
push esi
call dword [sym.imp.KERNEL32.dll_VirtualFreeEx]
mov edx, dword [ebp - 0x88c]
mov ecx, esi
call fcn.00401010
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
test ebx, ebx
je 0x402875
mov eax, dword [ebp - 0x894]
mov dword [edi], eax
jmp 0x402899
mov eax, dword [ebp - 0x14]
test eax, eax
je 0x4028b6
mov dword [edi], eax
mov ebx, 0x1d
jmp 0x402899
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov dword [edi], eax
mov ebx, 0x15
push esi
call dword [sym.imp.KERNEL32.dll_CloseHandle]
mov eax, dword [ebp - 0x898]
add eax, 0xc
mov dword [ebp - 0x898], eax
cmp eax, dword [ebp - 0x89c]
jne 0x402662
jmp 0x4028be
mov dword [edi], 0
xor ebx, ebx
push ebx
push 1
mov edx, edi
lea ecx, [edi + 4]
call fcn.00401e30
mov esi, dword [ebp - 0x20]
add esp, 8
mov edi, eax
test esi, esi
je 0x40291c
mov ecx, dword [ebp - 0x18]
mov eax, 0x2aaaaaab
sub ecx, esi
imul ecx
sar edx, 1
mov eax, edx
shr eax, 0x1f
add eax, edx
lea ecx, [eax + eax*2]
mov eax, esi
shl ecx, 2
cmp ecx, 0x1000
jb 0x402912
mov esi, dword [eax - 4]
add ecx, 0x23
sub eax, esi
add eax, 0xfffffffc
cmp eax, 0x1f
jbe 0x402912
call dword [sym.imp.api_ms_win_crt_runtime_l1_1_0.dll__invalid_parameter_noinfo_noreturn]
push ecx
push esi
call fcn.0040a49c
add esp, 8
mov eax, edi
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.0040a480
mov esp, ebp
pop ebp
ret