Function at 0x402294
Capabilities:
Allocate or change rwx memory
Check os version
Enumerate pe sections
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
push eax
mov eax, 2
add esp, 0xfffff004
push eax
dec eax
jne 0x40229d
mov eax, dword [ebp - 4]
add esp, 0xfffffc04
push ebx
push esi
push edi
mov ebx, dword [ebp + 8]
mov esi, 0x490e7a
lea edi, [ebp - 0x94]
mov ecx, 8
rep movsd dword es:[edi], dword [esi]
push 0x232c
push 0x4a89d8
lea eax, [ebp - 0x23c0]
push eax
call fcn.004051b8
add esp, 0xc
lea edx, [ebp - 0x94]
lea ecx, [ebp - 0x23c0]
push 0x232c
push edx
push 0x64
push ecx
call fcn.004037e4
add esp, 0x10
lea edi, [ebp - 0x23e0]
mov esi, 0x490e9a
mov ecx, 8
lea eax, [ebp - 0x23a2]
rep movsd dword es:[edi], dword [esi]
lea edi, [ebp - 0x2400]
mov ecx, 8
mov esi, 0x490eba
lea edx, [ebp - 0x23e0]
rep movsd dword es:[edi], dword [esi]
push 0x20
push eax
push edx
call fcn.004051b8
add esp, 0xc
cmp byte [ebp - 0x23af], 0
je 0x402361
mov ecx, dword [ebp + 0x1c]
push ecx
push 8
push 0x64
lea eax, [ebp - 0x2400]
push eax
lea edx, [ebp - 0x23e0]
push edx
call fcn.004036d4
add esp, 0x14
mov esi, dword [ebp + 0x10]
cmp esi, 0xfa000
jle 0x402371
mov esi, 0xfa000
push esi
lea eax, [ebp - 0x23e0]
push eax
push 0x64
mov edx, dword [ebp + 8]
push edx
call fcn.00403ab8
add esp, 0x10
mov eax, dword [ebp + 0x10]
sub eax, esi
cmp eax, 0x9c4000
jbe 0x402398
mov eax, 0x9c4000
test eax, eax
jbe 0x4023b7
push eax
lea edx, [ebp - 0x2400]
push edx
mov cx, word [ebp - 0x23a4]
push ecx
add esi, ebx
push esi
call fcn.004037e4
add esp, 0x10
cmp byte [ebp - 0x23ad], 0
cmp byte [ebp - 0x23ae], 0
je 0x402425
mov eax, dword [ebp - 0x23b4]
mov dword [ebp - 0x2c], eax
mov edx, dword [ebp + 0x1c]
push edx
push 0x80
push 0x64
mov ecx, dword [ebp - 0x2c]
add ecx, ebx
push ecx
mov eax, dword [ebp - 0x2c]
add eax, ebx
push eax
call fcn.00403728
add esp, 0x14
cmp byte [ebp - 0x217c], 0xa
jb 0x402401
cmp byte [ebp - 0x217c], 0x20
jb 0x402413
cmp byte [ebp - 0x217c], 0x28
je 0x402413
cmp byte [ebp - 0x217c], 0x8c
jne 0x402425
mov edx, dword [ebp + 0x1c]
push edx
push 0x20
add ebx, dword [ebp - 0x2c]
push ebx
call fcn.0040377c
add esp, 0xc
mov edi, dword [ebp + 8]
mov eax, dword [edi + 0x3c]
add eax, edi
mov dword [ebp - 4], eax
push 0xf8
mov edx, dword [ebp - 4]
push edx
call sub.KERNEL32.DLL_IsBadReadPtr
dec eax
je 0x40244c
mov ecx, dword [ebp - 4]
cmp dword [ecx], 0x4550
je 0x402453
xor eax, eax
jmp 0x40284c
mov edx, dword [ebp - 4]
movzx ecx, word [edx + 0x14]
add ecx, dword [ebp - 4]
add ecx, 0x18
mov dword [ebp - 8], ecx
mov dword [ebp - 0x30], 0x28
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 8]
sub eax, edi
movzx ecx, word [edx + 6]
imul ecx, dword [ebp - 0x30]
add eax, ecx
xor edx, edx
mov dword [ebp - 0x28], eax
xor edi, edi
mov eax, dword [ebp - 0x28]
mov dword [ebp - 0x24], eax
mov dword [ebp - 0x34], edx
mov eax, dword [ebp - 8]
lea ebx, [eax + 0xc]
jmp 0x4024b5
mov edx, dword [ebx]
mov ecx, edx
add ecx, dword [ebx + 4]
cmp ecx, dword [ebp - 0x24]
jbe 0x4024a3
mov dword [ebp - 0x24], ecx
mov ecx, dword [ebp - 4]
cmp edx, dword [ecx + 0x88]
jne 0x4024b1
mov dword [ebp - 0x34], eax
inc edi
add ebx, 0x28
mov edx, dword [ebp - 4]
movzx eax, di
movzx edx, word [edx + 6]
cmp eax, edx
jb 0x402494
lea eax, [ebp - 0x74]
push eax
call sub.KERNEL32.DLL_GetSystemInfo
mov eax, dword [ebp - 0x24]
mov ecx, dword [ebp - 0x70]
xor edx, edx
div ecx
mov dword [ebp - 0x20], eax
mov eax, dword [ebp - 0x24]
xor edx, edx
div ecx
test edx, edx
je 0x4024e7
inc dword [ebp - 0x20]
mov eax, dword [ebp - 0x20]
imul ecx
mov edx, dword [ebp + 0x14]
mov dword [edx], eax
push 0x40
push 0x1000
mov ecx, dword [ebp + 0x14]
mov eax, dword [ecx]
push eax
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x402528
push 0x10
push 0x491104
push str.Error_in_VirtualAlloc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x40284c
mov edx, dword [ebp - 0x28]
push edx
mov ecx, dword [ebp + 8]
push ecx
mov eax, dword [ebp + 0xc]
push eax
call fcn.004051dc
add esp, 0xc
xor edi, edi
mov eax, dword [ebp - 8]
lea ebx, [eax + 0xc]
jmp 0x402585
mov esi, dword [ebp + 0xc]
mov eax, dword [ebp + 8]
add esi, dword [ebx]
add eax, dword [ebx + 8]
mov edx, dword [ebx + 4]
mov dword [ebp - 0x38], edx
mov ecx, dword [ebp - 0x38]
push ecx
push eax
push esi
call fcn.004051dc
add esp, 0xc
mov eax, dword [ebp - 0x38]
push eax
lea edx, [ebp - 0x23a2]
push edx
mov cx, word [ebp - 0x23a4]
push ecx
push esi
call fcn.004037e4
add esp, 0x10
inc edi
add ebx, 0x28
mov eax, dword [ebp - 4]
cmp di, word [eax + 6]
jb 0x402546
mov edi, dword [ebp + 0xc]
mov eax, dword [edi + 0x3c]
add eax, edi
mov dword [ebp - 4], eax
mov edx, dword [ebp - 4]
add edx, 0xf8
mov dword [ebp - 8], edx
mov dword [0x4a89bc], edi
cmp dword [ebp - 0x34], 0
je 0x4025d9
call fcn.00402854
dec eax
jne 0x4025d9
mov ecx, dword [ebp - 0x34]
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 8]
add dword [eax + ecx*8 + 0xc], edx
mov ecx, dword [ebp - 0x34]
lea ecx, [ecx + ecx*4]
mov eax, dword [ebp - 8]
mov edx, dword [ebp + 8]
add dword [eax + ecx*8 + 0x14], edx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x80]
mov dword [ebp - 0x3c], eax
cmp dword [ebp - 0x3c], 0
jne 0x402612
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x491125
push str.Error_in_GetImgDirEntryRVA
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x40284c
mov edx, dword [ebp - 4]
mov eax, dword [ebp - 4]
mov ecx, dword [edx + 0x28]
mov edx, dword [ebp + 0x18]
add ecx, dword [eax + 0x34]
mov dword [edx], ecx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x80]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0
je 0x40263f
mov edx, dword [ebp - 0xc]
add edx, edi
mov dword [ebp - 0xc], edx
jmp 0x402666
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x491143
push str.Error_in_Get_ImportDesc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x40284c
mov edx, dword [ebp - 0xc]
cmp dword [edx + 4], 0
jne 0x40267c
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0
je 0x402742
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 0xc]
add ebx, dword [0x4a89bc]
push ebx
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x4026a0
push ebx
call sub.KERNEL32.DLL_LoadLibraryA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
je 0x402739
mov eax, dword [ebp - 0xc]
mov eax, dword [eax]
test eax, eax
je 0x4026b9
mov ebx, eax
add ebx, edi
jmp 0x4026c1
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 0x10]
add ebx, edi
mov eax, dword [ebp - 0xc]
mov esi, dword [eax + 0x10]
add esi, edi
jmp 0x402734
mov eax, 0x80000000
test dword [ebx], eax
je 0x4026ea
mov edx, dword [ebx]
and edx, 0xffff
push edx
mov ecx, dword [ebp - 0x1c]
push ecx
call sub.KERNEL32.DLL_GetProcAddress
mov dword [esi], eax
jmp 0x402703
mov eax, dword [ebx]
add eax, edi
mov dword [ebp - 0x10], eax
mov edx, dword [ebp - 0x10]
add edx, 2
push edx
mov ecx, dword [ebp - 0x1c]
push ecx
call sub.KERNEL32.DLL_GetProcAddress
mov dword [esi], eax
test esi, esi
jne 0x40272e
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x491160
push str.Error_in_set_FuncAddr.
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x40284c
add esi, 4
add ebx, 4
cmp dword [ebx], 0
jne 0x4026cb
add dword [ebp - 0xc], 0x14
jmp 0x402666
push edi
mov edx, dword [ebp - 4]
push edx
call fcn.00401224
add esp, 8
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0xc0], 0
jbe 0x4027e0
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0xc0]
add edx, edi
mov dword [ebp - 0x40], edx
mov ecx, dword [ebp - 0x40]
mov edx, dword [ebp - 0x40]
mov eax, dword [ecx + 4]
sub eax, dword [edx]
mov dword [ebp - 0x44], eax
push 4
push 0x1000
mov ecx, dword [ebp - 0x44]
push ecx
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [0x4a8788], eax
mov eax, dword [ebp - 0x40]
mov edx, dword [eax]
sub edx, dword [0x4a878c]
add edx, edi
mov dword [ebp - 0x48], edx
mov ecx, dword [ebp - 0x44]
push ecx
mov eax, dword [ebp - 0x48]
push eax
mov edx, dword [0x4a8788]
push edx
call fcn.004051b8
add esp, 0xc
mov ecx, dword [0x4a8788]
mov eax, dword fs:[0x2c]
mov dword [eax], ecx
mov ecx, dword [ebp - 0x40]
mov eax, dword [ecx + 8]
sub eax, dword [0x4a878c]
add eax, edi
mov dword [ebp - 0x4c], eax
mov edx, dword [ebp - 0x4c]
xor ecx, ecx
mov dword [edx], ecx
cmp byte [ebp - 0x23ac], 0
je 0x40280f
mov eax, dword [ebp - 4]
mov edx, dword [eax + 0x80]
add edx, edi
mov dword [ebp - 0xc], edx
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0x84]
push eax
push 0
mov edx, dword [ebp - 0xc]
push edx
call fcn.00405228
add esp, 0xc
mov ecx, dword [ebp - 4]
mov eax, dword [ecx + 0xa0]
add eax, edi
mov dword [ebp - 0x14], eax
cmp byte [ebp - 0x23ab], 0
je 0x40283e
mov edx, dword [ebp - 4]
mov ecx, dword [edx + 0xa4]
push ecx
push 0
mov eax, dword [ebp - 0x14]
push eax
call fcn.00405228
add esp, 0xc
mov edx, dword [ebp + 0xc]
mov eax, 1
mov dword [0x4a89c4], edx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret