Function at 0x412610
Capabilities:
Allocate or change rwx memory
Parse pe header

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x45e7ba
mov eax, dword fs:[0]
push eax
sub esp, 0x33c
mov eax, dword [0x47ea94]
xor eax, ebp
mov dword [ebp - 0x10], eax
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
push 0
push 0
push 0
push 0
push 0
push str.UpdateImports
lea ecx, [ebp - 0x330]
call fcn.00407b80
mov dword [ebp - 4], 0
mov dword [ebp - 0x32c], 0
mov dword [ebp - 0x2e0], 0
push 0x150
push 0
lea eax, [ebp - 0x2d4]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov dword [ebp - 0x2d4], 0x150
mov ecx, dword [ebp + 8]
push ecx
call fcn.00412510
add esp, 4
mov dword [ebp - 0x2d8], eax
push 0x40
push 0
lea edx, [ebp - 0x8c]
push edx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0
push 0x40
lea eax, [ebp - 0x8c]
push eax
mov ecx, dword [ebp - 0x2d8]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x41272c
cmp dword [ebp - 0x2e0], 0
je 0x412703
mov eax, dword [ebp - 0x2e0]
mov dword [ebp - 0x334], eax
mov ecx, dword [ebp - 0x334]
push ecx
call fcn.0045be16
add esp, 4
mov dword [ebp - 0x2e0], 0
mov edx, dword [ebp - 0x32c]
mov dword [ebp - 0x338], edx
mov dword [ebp - 4], 0xffffffff
lea ecx, [ebp - 0x330]
call fcn.00407aa0
mov eax, dword [ebp - 0x338]
jmp 0x4130b4
push 0x40
lea eax, [ebp - 0x8c]
push eax
lea ecx, [ebp - 0x2c0]
push ecx
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov edx, dword [ebp - 0x2d8]
mov dword [ebp - 0x2d0], edx
movzx eax, word [ebp - 0x8c]
cmp eax, 0x5a4d
je 0x412763
jmp 0x4126d5
push 0xf8
push 0
lea ecx, [ebp - 0x184]
push ecx
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0
push 0xf8
lea edx, [ebp - 0x184]
push edx
mov eax, dword [ebp - 0x2d8]
add eax, dword [ebp - 0x50]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x4127a4
jmp 0x4126d5
push 0xf8
lea edx, [ebp - 0x184]
push edx
lea eax, [ebp - 0x280]
push eax
call sub.VCRUNTIME140.dll_memcpy
add esp, 0xc
mov ecx, dword [ebp - 0x2d8]
add ecx, dword [ebp - 0x50]
mov dword [ebp - 0x2cc], ecx
cmp dword [ebp - 0x184], 0x4550
je 0x4127df
jmp 0x4126d5
mov edx, 8
shl edx, 0
cmp dword [ebp + edx - 0x10c], 0
jne 0x4127f6
jmp 0x4126d5
mov eax, 8
imul ecx, eax, 0xb
mov dword [ebp + ecx - 0x10c], 0
mov edx, 8
imul eax, edx, 0xb
mov dword [ebp + eax - 0x108], 0
mov dword [ebp - 0x320], 0
movzx ecx, word [ebp - 0x170]
mov edx, dword [ebp - 0x50]
lea eax, [edx + ecx + 0x18]
mov dword [ebp - 0x33c], eax
mov dword [ebp - 0x2e4], 0
jmp 0x412855
mov ecx, dword [ebp - 0x2e4]
add ecx, 1
mov dword [ebp - 0x2e4], ecx
movzx edx, word [ebp - 0x17e]
cmp dword [ebp - 0x2e4], edx
jae 0x412929
push 0x28
push 0
lea eax, [ebp - 0x38]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
push 0
push 0x28
lea ecx, [ebp - 0x38]
push ecx
mov edx, dword [ebp - 0x2d8]
add edx, dword [ebp - 0x33c]
imul eax, dword [ebp - 0x2e4], 0x28
add edx, eax
push edx
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x4128a9
jmp 0x4126d5
mov edx, 8
imul eax, edx, 0xc
cmp dword [ebp + eax - 0x10c], 0
jne 0x41290a
mov ecx, 8
shl ecx, 0
mov edx, dword [ebp + ecx - 0x10c]
cmp edx, dword [ebp - 0x2c]
jb 0x41290a
mov eax, 8
shl eax, 0
mov ecx, dword [ebp - 0x2c]
add ecx, dword [ebp - 0x28]
cmp dword [ebp + eax - 0x10c], ecx
jae 0x41290a
mov edx, 8
imul eax, edx, 0xc
mov ecx, dword [ebp - 0x2c]
mov dword [ebp + eax - 0x10c], ecx
mov edx, 8
imul eax, edx, 0xc
mov ecx, dword [ebp - 0x28]
mov dword [ebp + eax - 0x108], ecx
mov edx, dword [ebp - 0x24]
add edx, dword [ebp - 0x28]
cmp dword [ebp - 0x320], edx
jae 0x412924
mov eax, dword [ebp - 0x24]
add eax, dword [ebp - 0x28]
mov dword [ebp - 0x320], eax
jmp 0x412846
lea ecx, [ebp - 0x184]
push ecx
mov edx, dword [ebp - 0x2d8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00412140
add esp, 0xc
mov word [ebp - 0x2f8], ax
imul ecx, dword [ebp + 0x10], 0x14
mov dword [ebp - 0x328], ecx
mov edx, 8
shl edx, 0
mov eax, dword [ebp - 0x328]
add eax, dword [ebp + edx - 0x108]
push eax
call fcn.00412370
add esp, 4
mov dword [ebp - 0x314], eax
mov ecx, dword [ebp + 0x10]
shl ecx, 4
add ecx, dword [ebp - 0x314]
mov dword [ebp - 0x340], ecx
mov edx, dword [ebp - 0x340]
mov dword [ebp - 0x2f0], edx
mov eax, dword [ebp - 0x2f0]
mov dword [ebp - 0x2f4], eax
mov dword [ebp - 0x2dc], 0
jmp 0x4129bd
mov ecx, dword [ebp - 0x2dc]
add ecx, 1
mov dword [ebp - 0x2dc], ecx
mov edx, dword [ebp - 0x2dc]
cmp edx, dword [ebp + 0x10]
jae 0x4129f7
mov eax, dword [ebp - 0x2dc]
mov ecx, dword [ebp + 0xc]
mov edx, dword [ecx + eax*4]
push edx
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
add eax, 1
push eax
call fcn.00412360
add esp, 4
add eax, dword [ebp - 0x2f4]
mov dword [ebp - 0x2f4], eax
jmp 0x4129ae
mov eax, dword [ebp - 0x2f4]
push eax
call fcn.0045be0d
add esp, 4
mov dword [ebp - 0x344], eax
mov ecx, dword [ebp - 0x344]
mov dword [ebp - 0x2e0], ecx
cmp dword [ebp - 0x2e0], 0
jne 0x412a26
jmp 0x4126d5
mov edx, dword [ebp - 0x2f4]
push edx
push 0
mov eax, dword [ebp - 0x2e0]
push eax
call sub.VCRUNTIME140.dll_memset
add esp, 0xc
mov ecx, dword [ebp - 0x2d8]
mov dword [ebp - 0x30c], ecx
mov edx, dword [ebp - 0x30c]
add edx, dword [ebp - 0x158]
add edx, dword [ebp - 0x168]
add edx, dword [ebp - 0x164]
add edx, dword [ebp - 0x160]
mov dword [ebp - 0x324], edx
mov eax, dword [ebp - 0x30c]
cmp eax, dword [ebp - 0x324]
jae 0x412a88
mov ecx, dword [ebp - 0x324]
mov dword [ebp - 0x30c], ecx
mov edx, dword [ebp - 0x2f4]
push edx
mov eax, dword [ebp - 0x30c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00412240
add esp, 0xc
mov dword [ebp - 0x31c], eax
cmp dword [ebp - 0x31c], 0
jne 0x412ab6
jmp 0x4126d5
mov dword [ebp - 0x2e8], 0
mov dword [ebp - 0x2c4], 0
lea edx, [ebp - 0x2e8]
push edx
push 0x40
mov eax, 8
shl eax, 0
mov ecx, dword [ebp + eax - 0x108]
push ecx
mov edx, 8
shl edx, 0
mov eax, dword [ebp - 0x2d8]
add eax, dword [ebp + edx - 0x10c]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x412b0c
jmp 0x4126d5
mov edx, dword [ebp - 0x2e8]
mov dword [ebp - 0x2c4], edx
mov eax, dword [ebp - 0x31c]
sub eax, dword [ebp - 0x2d8]
mov dword [ebp - 0x308], eax
push 0
mov ecx, 8
shl ecx, 0
mov edx, dword [ebp + ecx - 0x108]
push edx
mov eax, dword [ebp - 0x2e0]
add eax, dword [ebp - 0x328]
push eax
mov ecx, 8
shl ecx, 0
mov edx, dword [ebp - 0x2d8]
add edx, dword [ebp + ecx - 0x10c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x412b72
jmp 0x4126d5
mov ecx, dword [ebp - 0x2e0]
mov dword [ebp - 0x2ec], ecx
mov dword [ebp - 0x2dc], 0
jmp 0x412b99
mov edx, dword [ebp - 0x2dc]
add edx, 1
mov dword [ebp - 0x2dc], edx
mov eax, dword [ebp - 0x2dc]
cmp eax, dword [ebp + 0x10]
jae 0x412d43
mov ecx, dword [ebp - 0x2dc]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4]
push eax
mov ecx, dword [ebp - 0x2f4]
sub ecx, dword [ebp - 0x2f0]
push ecx
mov edx, dword [ebp - 0x2e0]
add edx, dword [ebp - 0x2f0]
push edx
call fcn.004130d0
mov dword [ebp - 0x348], eax
cmp dword [ebp - 0x348], 0
jge 0x412be8
jmp 0x4126d5
mov eax, dword [ebp - 0x2dc]
shl eax, 2
mov ecx, dword [ebp - 0x314]
lea edx, [ecx + eax*4]
mov dword [ebp - 0x2fc], edx
mov eax, dword [ebp - 0x308]
add eax, dword [ebp - 0x2fc]
imul ecx, dword [ebp - 0x2dc], 0x14
mov edx, dword [ebp - 0x2ec]
mov dword [edx + ecx], eax
mov eax, dword [ebp - 0x2e0]
add eax, dword [ebp - 0x2fc]
mov dword [ebp - 0x300], eax
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [ebp - 0x300]
mov dword [eax + edx], SysReAllocString
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp - 0x300]
mov dword [edx + ecx], 0
mov eax, dword [ebp - 0x2dc]
shl eax, 2
mov ecx, dword [ebp - 0x314]
lea edx, [ecx + eax*4 + 8]
mov dword [ebp - 0x2fc], edx
mov eax, dword [ebp - 0x308]
add eax, dword [ebp - 0x2fc]
imul ecx, dword [ebp - 0x2dc], 0x14
mov edx, dword [ebp - 0x2ec]
mov dword [edx + ecx + 0x10], eax
mov eax, dword [ebp - 0x2e0]
add eax, dword [ebp - 0x2fc]
mov dword [ebp - 0x300], eax
mov ecx, 4
imul edx, ecx, 0
mov eax, dword [ebp - 0x300]
mov dword [eax + edx], SysReAllocString
mov ecx, 4
shl ecx, 0
mov edx, dword [ebp - 0x300]
mov dword [edx + ecx], 0
imul eax, dword [ebp - 0x2dc], 0x14
mov ecx, dword [ebp - 0x2ec]
mov dword [ecx + eax + 4], 0
imul edx, dword [ebp - 0x2dc], 0x14
mov eax, dword [ebp - 0x2ec]
mov dword [eax + edx + 8], 0
mov ecx, dword [ebp - 0x308]
add ecx, dword [ebp - 0x2f0]
imul edx, dword [ebp - 0x2dc], 0x14
mov eax, dword [ebp - 0x2ec]
mov dword [eax + edx + 0xc], ecx
mov ecx, dword [ebp - 0x2dc]
mov edx, dword [ebp + 0xc]
mov eax, dword [edx + ecx*4]
push eax
call sub.api_ms_win_crt_string_l1_1_0.dll_strlen
add esp, 4
add eax, 1
push eax
call fcn.00412360
add esp, 4
add eax, dword [ebp - 0x2f0]
mov dword [ebp - 0x2f0], eax
jmp 0x412b8a
mov dword [ebp - 0x2e4], 0
jmp 0x412d5e
mov ecx, dword [ebp - 0x2e4]
add ecx, 1
mov dword [ebp - 0x2e4], ecx
mov edx, 8
shl edx, 0
mov eax, dword [ebp + edx - 0x108]
xor edx, edx
mov ecx, 0x14
div ecx
add eax, dword [ebp + 0x10]
cmp dword [ebp - 0x2e4], eax
jae 0x412dac
imul edx, dword [ebp - 0x2e4], 0x14
mov eax, dword [ebp - 0x2ec]
cmp dword [eax + edx], 0
jne 0x412daa
imul ecx, dword [ebp - 0x2e4], 0x14
mov edx, dword [ebp - 0x2ec]
cmp dword [edx + ecx + 0x10], 0
jne 0x412daa
jmp 0x412dac
jmp 0x412d4f
push 0
mov eax, dword [ebp - 0x2f0]
push eax
mov ecx, dword [ebp - 0x2e0]
push ecx
mov edx, dword [ebp - 0x31c]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x412dd6
jmp 0x4126d5
mov ecx, 8
shl ecx, 0
mov edx, dword [ebp - 0x308]
mov dword [ebp + ecx - 0x10c], edx
mov eax, 8
shl eax, 0
mov ecx, dword [ebp - 0x2f4]
mov dword [ebp + eax - 0x108], ecx
mov edx, 8
imul eax, edx, 0xe
cmp dword [ebp + eax - 0x10c], 0
je 0x412efb
mov ecx, 8
imul edx, ecx, 0xe
cmp dword [ebp + edx - 0x108], 0
je 0x412efb
mov eax, 8
imul ecx, eax, 0xe
mov edx, dword [ebp - 0x2d8]
add edx, dword [ebp + ecx - 0x10c]
mov dword [ebp - 0x304], edx
push 0
push 0x14
lea eax, [ebp - 0x4c]
push eax
mov ecx, dword [ebp - 0x304]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_ReadProcessMemory]
test eax, eax
jne 0x412e69
jmp 0x4126d5
mov eax, dword [ebp - 0x304]
add eax, 0x10
mov dword [ebp - 0x2c8], eax
mov ecx, dword [ebp - 0x3c]
mov dword [ebp - 0x188], ecx
mov edx, dword [ebp - 0x3c]
and edx, 0xfffffffe
mov dword [ebp - 0x3c], edx
lea eax, [ebp - 0x2e8]
push eax
push 4
push 0x14
mov ecx, dword [ebp - 0x304]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x412eaf
jmp 0x4126d5
push 0
push 0x14
lea eax, [ebp - 0x4c]
push eax
mov ecx, dword [ebp - 0x304]
push ecx
mov edx, dword [ebp + 8]
push edx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x412ed1
jmp 0x4126d5
lea eax, [ebp - 0x2e8]
push eax
mov ecx, dword [ebp - 0x2e8]
push ecx
push 0x14
mov edx, dword [ebp - 0x304]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x412efb
jmp 0x4126d5
lea ecx, [ebp - 0x2e8]
push ecx
push 0x40
mov edx, dword [ebp - 0x130]
push edx
mov eax, dword [ebp - 0x2d8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x412f25
jmp 0x4126d5
mov edx, 2
imul eax, edx, 0
xor ecx, ecx
mov word [ebp + eax - 0x70], cx
push 0
push 0x40
lea edx, [ebp - 0x8c]
push edx
mov eax, dword [ebp - 0x2d8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x412f59
jmp 0x4126d5
push 0
push 0xf8
lea edx, [ebp - 0x184]
push edx
mov eax, dword [ebp - 0x2d8]
add eax, dword [ebp - 0x50]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x412f84
jmp 0x4126d5
lea edx, [ebp - 0x184]
push edx
mov eax, dword [ebp - 0x2d8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call fcn.00412140
add esp, 0xc
mov word [ebp - 0x310], ax
movzx edx, word [ebp - 0x2f8]
push edx
movzx eax, word [ebp - 0x310]
push eax
call fcn.00411e30
add esp, 8
movzx ecx, ax
push ecx
mov edx, 2
imul eax, edx, 0
movzx ecx, word [ebp + eax - 0x70]
push ecx
call fcn.00411e30
add esp, 8
mov edx, 2
imul ecx, edx, 0
mov word [ebp + ecx - 0x70], ax
push 0
push 0x40
lea edx, [ebp - 0x8c]
push edx
mov eax, dword [ebp - 0x2d8]
push eax
mov ecx, dword [ebp + 8]
push ecx
call dword [sym.imp.KERNEL32.dll_WriteProcessMemory]
test eax, eax
jne 0x413009
jmp 0x4126d5
lea edx, [ebp - 0x2e8]
push edx
mov eax, dword [ebp - 0x2e8]
push eax
mov ecx, dword [ebp - 0x130]
push ecx
mov edx, dword [ebp - 0x2d8]
push edx
mov eax, dword [ebp + 8]
push eax
call dword [sym.imp.KERNEL32.dll_VirtualProtectEx]
test eax, eax
jne 0x413038
jmp 0x4126d5
lea ecx, [ebp - 0x184]
push ecx
mov edx, dword [ebp - 0x2d8]
push edx
mov eax, dword [ebp + 8]
push eax
call fcn.00412140
add esp, 0xc
mov word [ebp - 0x318], ax
movzx ecx, word [ebp - 0x2f8]
movzx edx, word [ebp - 0x318]
cmp ecx, edx
je 0x413070
jmp 0x4126d5
push 0x150
lea eax, [ebp - 0x2d4]
push eax
push 0x465ba4
mov ecx, dword [ebp + 8]
push ecx
call fcn.00411a20
test eax, eax
jne 0x413093
jmp 0x4126d5
mov dword [ebp - 0x32c], 1
jmp 0x4126d5
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0045be1b
mov esp, ebp
pop ebp
ret