Function at 0x401970
Capabilities:
Allocate or change rwx memory
Enumerate pe sections
Get system information on windows

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffa8
push ebx
push esi
push edi
mov eax, dword [ebp + 0x10]
push eax
mov edx, dword [ebp + 8]
push edx
call fcn.00401e80
add esp, 8
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 0x4019b0
mov ecx, dword [ebp - 4]
cmp dword [ecx], 0x4550
je 0x4019b7
xor eax, eax
jmp 0x401d33
mov edx, dword [ebp - 4]
mov eax, 0x28
movzx ecx, word [edx + 0x14]
add ecx, dword [ebp - 4]
add ecx, 0x18
mov dword [ebp - 8], ecx
mov ecx, dword [ebp - 4]
mov edx, dword [ebp - 8]
sub edx, edi
movzx ecx, word [ecx + 6]
imul ecx, eax
add edx, ecx
xor eax, eax
mov dword [ebp - 0x20], edx
xor edi, edi
mov esi, dword [ebp - 0x20]
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 8]
lea ebx, [eax + 0xc]
jmp 0x401a14
mov edx, dword [ebx]
mov eax, edx
add eax, dword [ebx + 4]
cmp esi, eax
jae 0x4019ff
mov esi, eax
mov eax, dword [ebp - 4]
cmp edx, dword [eax + 0x88]
jne 0x401a10
movzx edx, di
mov dword [ebp - 0x24], edx
inc edi
add ebx, 0x28
mov eax, dword [ebp - 4]
movzx ecx, di
movzx edx, word [eax + 6]
cmp ecx, edx
jb 0x4019f2
lea ecx, [ebp - 0x58]
push ecx
call sub.KERNEL32.DLL_GetSystemInfo
mov eax, esi
mov ecx, dword [ebp - 0x54]
xor edx, edx
div ecx
mov ebx, eax
mov eax, esi
xor edx, edx
div ecx
test edx, edx
je 0x401a41
inc ebx
imul ebx, ecx
mov ecx, dword [ebp + 0x14]
mov dword [ecx], ebx
push 0x40
push 0x1000
mov eax, dword [ebp + 0x14]
mov edx, dword [eax]
push edx
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x401a80
push 0x10
push 0x40a44a
push str.Error_in_VirtualAlloc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401d33
mov edx, dword [ebp - 0x20]
push edx
mov ecx, dword [ebp + 8]
push ecx
mov eax, dword [ebp + 0xc]
push eax
call fcn.00403360
add esp, 0xc
xor edi, edi
mov eax, dword [ebp - 8]
lea ebx, [eax + 0xc]
jmp 0x401abb
mov eax, dword [ebp + 0xc]
mov edx, dword [ebp + 8]
add eax, dword [ebx]
add edx, dword [ebx + 8]
mov esi, dword [ebx + 4]
push esi
push edx
push eax
call fcn.00403360
add esp, 0xc
inc edi
add ebx, 0x28
mov eax, dword [ebp - 4]
cmp di, word [eax + 6]
jb 0x401a9e
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 [0x40cd74], edi
cmp dword [ebp - 0x24], 0
je 0x401b0f
call fcn.00401d3c
dec eax
jne 0x401b0f
mov ecx, dword [ebp - 0x24]
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 - 0x24]
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 - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x401b48
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x40a46b
push str.Error_in_GetImgDirEntryRVA
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401d33
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 0x401b75
mov edx, dword [ebp - 0xc]
add edx, edi
mov dword [ebp - 0xc], edx
jmp 0x401b9c
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x40a489
push str.Error_in_Get_ImportDesc
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401d33
mov edx, dword [ebp - 0xc]
cmp dword [edx + 4], 0
jne 0x401bb2
mov ecx, dword [ebp - 0xc]
cmp dword [ecx + 0xc], 0
je 0x401c9b
mov eax, dword [ebp - 0xc]
mov ebx, dword [eax + 0xc]
add ebx, dword [0x40cd74]
push ebx
call sub.KERNEL32.DLL_GetModuleHandleA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x401bd6
push ebx
call sub.KERNEL32.DLL_LoadLibraryA
mov dword [ebp - 0x1c], eax
cmp dword [ebp - 0x1c], 0
jne 0x401c03
push 0x10
push 0x40a4a7
push str.Cant_Find_required_Dll
push 0
call sub.USER32.DLL_MessageBoxA
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
xor eax, eax
jmp 0x401d33
mov edx, dword [ebp - 0xc]
mov eax, dword [edx]
test eax, eax
je 0x401c12
mov ebx, eax
add ebx, edi
jmp 0x401c1a
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 0x401c8d
mov eax, 0x80000000
test dword [ebx], eax
je 0x401c43
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 0x401c5c
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 0x401c87
push 0x8000
push 0
push edi
call sub.KERNEL32.DLL_VirtualFree
push 0x10
push 0x40a4c4
push str.Error_in_set_FuncAddr.
push 0
call sub.USER32.DLL_MessageBoxA
xor eax, eax
jmp 0x401d33
add esi, 4
add ebx, 4
cmp dword [ebx], 0
jne 0x401c24
add dword [ebp - 0xc], 0x14
jmp 0x401b9c
push edi
mov edx, dword [ebp - 4]
push edx
call fcn.0040120c
add esp, 8
mov ecx, dword [ebp - 4]
cmp dword [ecx + 0xc0], 0
jbe 0x401d26
mov eax, dword [ebp - 4]
mov ebx, dword [eax + 0xc0]
add ebx, edi
mov eax, dword [ebx + 4]
sub eax, dword [ebx]
mov dword [ebp - 0x2c], eax
push 4
push 0x1000
mov edx, dword [ebp - 0x2c]
push edx
push 0
call sub.KERNEL32.DLL_VirtualAlloc
mov dword [0x40caec], eax
mov ecx, dword [ebx]
sub ecx, dword [0x40caf0]
add ecx, edi
mov dword [ebp - 0x30], ecx
mov eax, dword [ebp - 0x2c]
push eax
mov edx, dword [ebp - 0x30]
push edx
mov ecx, dword [0x40caec]
push ecx
call fcn.0040333c
add esp, 0xc
mov ecx, dword [0x40caec]
mov eax, dword fs:[0x2c]
mov dword [eax], ecx
mov eax, dword [ebx + 8]
sub eax, dword [0x40caf0]
add eax, edi
mov dword [ebp - 0x34], eax
mov edx, dword [ebp - 0x34]
xor ecx, ecx
mov dword [edx], ecx
mov eax, dword [ebp + 0xc]
mov dword [0x40cd7c], eax
mov eax, 1
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret