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

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x8c
cmp dword [ebp + 8], 0
jne 0x46a0f8
mov eax, 1
jmp 0x46a6cf
mov eax, dword [ebp + 8]
mov dword [ebp - 0x70], eax
push 0x40
mov ecx, dword [ebp - 0x70]
push ecx
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, 1
je 0x46a11e
mov edx, dword [ebp - 0x70]
xor eax, eax
mov ax, word [edx]
cmp eax, 0x5a4d
je 0x46a128
mov eax, 2
jmp 0x46a6cf
mov ecx, dword [ebp - 0x70]
mov edx, dword [ebp - 0x70]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x6c], edx
push 0xf8
mov eax, dword [ebp - 0x6c]
push eax
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
cmp eax, 1
je 0x46a153
mov ecx, dword [ebp - 0x6c]
cmp dword [ecx], 0x4550
je 0x46a15d
mov eax, 3
jmp 0x46a6cf
mov edx, dword [ebp - 0x6c]
xor eax, eax
mov ax, word [edx + 0x14]
cmp eax, 0xe0
jne 0x46a17e
mov ecx, dword [ebp - 0x6c]
xor edx, edx
mov dx, word [ecx + 0x18]
cmp edx, 0x10b
je 0x46a188
mov eax, 4
jmp 0x46a6cf
mov eax, dword [ebp - 0x6c]
xor ecx, ecx
mov cx, word [eax + 6]
cmp ecx, 1
jge 0x46a1a0
mov eax, 5
jmp 0x46a6cf
mov edx, dword [ebp - 0x6c]
xor eax, eax
mov ax, word [edx + 0x14]
mov ecx, dword [ebp - 0x6c]
lea edx, [ecx + eax + 0x18]
mov dword [ebp - 0x18], edx
mov dword [ebp - 0xc], 0x28
mov eax, dword [ebp - 0x18]
sub eax, dword [ebp - 0x70]
mov ecx, dword [ebp - 0x6c]
xor edx, edx
mov dx, word [ecx + 6]
mov ecx, dword [ebp - 0xc]
imul ecx, edx
add eax, ecx
mov dword [ebp - 0x74], eax
mov edx, dword [ebp - 0x74]
mov dword [ebp - 0x54], edx
mov dword [ebp - 0x14], 0
mov word [ebp - 0x5c], 0
jmp 0x46a1f5
mov ax, word [ebp - 0x5c]
add ax, 1
mov word [ebp - 0x5c], ax
mov ecx, dword [ebp - 0x5c]
and ecx, 0xffff
mov edx, dword [ebp - 0x6c]
xor eax, eax
mov ax, word [edx + 6]
cmp ecx, eax
jae 0x46a291
mov ecx, dword [ebp - 0x5c]
and ecx, 0xffff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x5c]
and edx, 0xffff
imul edx, edx, 0x28
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + ecx + 0xc]
mov eax, dword [ebp - 0x18]
add ecx, dword [eax + edx + 0x10]
cmp dword [ebp - 0x54], ecx
jae 0x46a263
mov ecx, dword [ebp - 0x5c]
and ecx, 0xffff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x5c]
and edx, 0xffff
imul edx, edx, 0x28
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + ecx + 0xc]
mov eax, dword [ebp - 0x18]
add ecx, dword [eax + edx + 0x10]
mov dword [ebp - 0x54], ecx
mov ecx, dword [ebp - 0x5c]
and ecx, 0xffff
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x6c]
mov eax, dword [ebp - 0x18]
mov edx, dword [edx + 0x88]
cmp edx, dword [eax + ecx + 0xc]
jne 0x46a28c
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
mov dword [ebp - 0x14], eax
jmp 0x46a1e9
lea ecx, [ebp - 0x50]
push ecx
call dword [sym.imp.KERNEL32.dll_GetSystemInfo]
mov eax, dword [ebp - 0x54]
xor edx, edx
div dword [ebp - 0x4c]
mov dword [ebp - 0x58], eax
mov eax, dword [ebp - 0x54]
xor edx, edx
div dword [ebp - 0x4c]
test edx, edx
je 0x46a2bb
mov edx, dword [ebp - 0x58]
add edx, 1
mov dword [ebp - 0x58], edx
mov eax, dword [ebp - 0x58]
imul eax, dword [ebp - 0x4c]
mov dword [ebp - 0x64], eax
push 0x40
push 0x1000
mov ecx, dword [ebp - 0x64]
push ecx
push 0
call dword [sym.imp.KERNEL32.dll_VirtualAlloc]
mov dword [ebp + 0xc], eax
cmp dword [ebp + 0xc], 0
jne 0x46a2eb
mov eax, 6
jmp 0x46a6cf
mov edx, dword [ebp - 0x74]
push edx
mov eax, dword [ebp + 8]
push eax
mov ecx, dword [ebp + 0xc]
push ecx
call sub.MSVCRT.dll_memmove
add esp, 0xc
mov dword [ebp - 0x68], 0
mov dword [ebp - 0x20], 0
mov dword [ebp - 4], 0
mov word [ebp - 0x5c], 0
jmp 0x46a328
mov dx, word [ebp - 0x5c]
add dx, 1
mov word [ebp - 0x5c], dx
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
mov ecx, dword [ebp - 0x6c]
xor edx, edx
mov dx, word [ecx + 6]
cmp eax, edx
jge 0x46a398
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 0xc]
add edx, dword [ecx + eax + 0xc]
mov dword [ebp - 0x68], edx
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x18]
mov edx, dword [ebp + 8]
add edx, dword [ecx + eax + 0x14]
mov dword [ebp - 0x20], edx
mov eax, dword [ebp - 0x5c]
and eax, 0xffff
imul eax, eax, 0x28
mov ecx, dword [ebp - 0x18]
mov edx, dword [ecx + eax + 0x10]
mov dword [ebp - 4], edx
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [ebp - 0x20]
push ecx
mov edx, dword [ebp - 0x68]
push edx
call sub.MSVCRT.dll_memmove
add esp, 0xc
jmp 0x46a31c
mov eax, dword [ebp + 0xc]
mov dword [ebp - 0x70], eax
mov ecx, dword [ebp - 0x70]
mov edx, dword [ebp - 0x70]
add edx, dword [ecx + 0x3c]
mov dword [ebp - 0x6c], edx
mov eax, dword [ebp - 0x6c]
add eax, 0xf8
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp - 0x70]
mov dword [0x4a2de4], ecx
cmp dword [ebp - 0x14], 0
je 0x46a408
call fcn.00469ed0
cmp eax, 1
jne 0x46a408
mov edx, dword [ebp - 0x14]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x18]
mov ecx, dword [eax + edx + 0xc]
add ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x14]
imul edx, edx, 0x28
mov eax, dword [ebp - 0x18]
mov dword [eax + edx + 0xc], ecx
mov ecx, dword [ebp - 0x14]
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x18]
mov eax, dword [edx + ecx + 0x14]
add eax, dword [ebp + 8]
mov ecx, dword [ebp - 0x14]
imul ecx, ecx, 0x28
mov edx, dword [ebp - 0x18]
mov dword [edx + ecx + 0x14], eax
mov eax, dword [ebp - 0x6c]
mov ecx, dword [eax + 0x80]
mov dword [ebp - 0x7c], ecx
cmp dword [ebp - 0x7c], 0
jne 0x46a435
push 0x8000
push 0
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 7
jmp 0x46a6cf
mov eax, dword [ebp - 0x6c]
mov ecx, dword [eax + 0x80]
mov dword [ebp - 8], ecx
cmp dword [ebp - 8], 0
je 0x46a452
mov edx, dword [ebp - 8]
add edx, dword [ebp - 0x70]
mov dword [ebp - 8], edx
jmp 0x46a46d
push 0x8000
push 0
mov eax, dword [ebp - 0x70]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 8
jmp 0x46a6cf
mov ecx, 1
test ecx, ecx
je 0x46a5b9
mov edx, dword [ebp - 8]
cmp dword [edx + 4], 0
jne 0x46a491
mov eax, dword [ebp - 8]
cmp dword [eax + 0xc], 0
jne 0x46a491
jmp 0x46a5b9
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0xc]
add edx, dword [0x4a2de4]
mov dword [ebp - 0x24], edx
mov eax, dword [ebp - 0x24]
push eax
call dword [sym.imp.KERNEL32.dll_GetModuleHandleA]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x46a4c0
mov ecx, dword [ebp - 0x24]
push ecx
call dword [sym.imp.KERNEL32.dll_LoadLibraryA]
mov dword [ebp - 0x28], eax
cmp dword [ebp - 0x28], 0
jne 0x46a4cb
jmp 0x46a6ca
mov edx, dword [ebp - 8]
cmp dword [edx], 0
je 0x46a4e3
mov eax, dword [ebp - 8]
mov ecx, dword [eax]
add ecx, dword [ebp - 0x70]
mov dword [ebp - 0x84], ecx
jmp 0x46a4f2
mov edx, dword [ebp - 8]
mov eax, dword [edx + 0x10]
add eax, dword [ebp - 0x70]
mov dword [ebp - 0x84], eax
mov ecx, dword [ebp - 8]
mov edx, dword [ecx + 0x10]
add edx, dword [ebp - 0x70]
mov dword [ebp - 0x80], edx
mov eax, dword [ebp - 0x84]
cmp dword [eax], 0
je 0x46a5ab
mov dword [ebp - 0x88], 0x80000000
mov ecx, dword [ebp - 0x84]
mov edx, dword [ecx]
and edx, dword [ebp - 0x88]
test edx, edx
je 0x46a549
mov eax, dword [ebp - 0x84]
mov ecx, dword [eax]
and ecx, 0xffff
push ecx
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x80]
mov dword [ecx], eax
jmp 0x46a56d
mov edx, dword [ebp - 0x84]
mov eax, dword [edx]
add eax, dword [ebp - 0x70]
mov dword [ebp - 0x60], eax
mov ecx, dword [ebp - 0x60]
add ecx, 2
push ecx
mov edx, dword [ebp - 0x28]
push edx
call dword [sym.imp.KERNEL32.dll_GetProcAddress]
mov ecx, dword [ebp - 0x80]
mov dword [ecx], eax
cmp dword [ebp - 0x80], 0
jne 0x46a58e
push 0x8000
push 0
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xa
jmp 0x46a6cf
mov eax, dword [ebp - 0x80]
add eax, 4
mov dword [ebp - 0x80], eax
mov ecx, dword [ebp - 0x84]
add ecx, 4
mov dword [ebp - 0x84], ecx
jmp 0x46a4fe
mov edx, dword [ebp - 8]
add edx, 0x14
mov dword [ebp - 8], edx
jmp 0x46a46d
mov eax, dword [ebp - 0x6c]
mov ecx, dword [eax + 0xa0]
mov dword [ebp - 0x2c], ecx
cmp dword [ebp - 0x2c], 0
je 0x46a697
mov edx, dword [ebp - 0x2c]
add edx, dword [ebp - 0x70]
mov dword [ebp - 0x2c], edx
mov eax, dword [ebp - 0x2c]
cmp dword [eax], 0
je 0x46a697
mov ecx, dword [ebp - 0x2c]
add ecx, 8
mov dword [ebp - 0x8c], ecx
mov edx, dword [ebp - 0x2c]
mov eax, dword [ebp - 0x2c]
add eax, dword [edx + 4]
cmp dword [ebp - 0x8c], eax
jae 0x46a686
mov ecx, dword [ebp - 0x8c]
xor edx, edx
mov dx, word [ecx]
and edx, 0xf000
mov dword [ebp - 0x78], edx
cmp dword [ebp - 0x78], 0x3000
jne 0x46a654
mov eax, dword [ebp - 0x2c]
mov ecx, dword [ebp - 0x70]
add ecx, dword [eax]
mov edx, dword [ebp - 0x8c]
xor eax, eax
mov ax, word [edx]
and eax, 0xfff
add ecx, eax
mov dword [ebp - 0x1c], ecx
mov ecx, dword [ebp - 0x1c]
mov edx, dword [ebp - 0x70]
add edx, dword [ecx]
mov eax, dword [ebp - 0x6c]
sub edx, dword [eax + 0x34]
mov ecx, dword [ebp - 0x1c]
mov dword [ecx], edx
jmp 0x46a672
cmp dword [ebp - 0x78], 0
je 0x46a672
push 0x8000
push 0
mov edx, dword [ebp - 0x70]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualFree]
mov eax, 0xa
jmp 0x46a6cf
mov eax, dword [ebp - 0x8c]
add eax, 2
mov dword [ebp - 0x8c], eax
jmp 0x46a5f0
mov ecx, dword [ebp - 0x2c]
mov edx, dword [ebp - 0x2c]
add edx, dword [ecx + 4]
mov dword [ebp - 0x2c], edx
jmp 0x46a5d8
mov eax, dword [ebp - 0x6c]
mov ecx, dword [eax + 0x28]
add ecx, dword [ebp - 0x70]
mov dword [0x4a2dd0], ecx
mov dword [ebp - 0x10], 0
mov edx, dword [ebp - 0x10]
push edx
push 1
mov eax, dword [ebp - 0x70]
push eax
call dword [0x4a2dd0]
mov ecx, dword [ebp + 0xc]
mov dword [0x4a2ddc], ecx
xor eax, eax
jmp 0x46a6cf
jmp 0x46a5ab
mov esp, ebp
pop ebp
ret