Function at 0x42115c
Capabilities:
Resolve function by parsing pe exports

Disassembly:
sub esp, 0xdc
mov eax, dword [0x5107c0]
xor eax, esp
mov dword [esp + 0xd8], eax
mov eax, dword [esp + 0xe0]
push ebx
push ebp
mov ebp, dword [esp + 0xf0]
mov ebx, ecx
mov dword [esp + 0x38], eax
mov eax, dword [esp + 0xec]
push str.CDeviceX::GetMediaKey
mov dword [esp + 0x38], eax
call dword [sym.imp.VMProtectSDK32.dll_VMProtectBegin]
cmp dword [ebx + 0x70], 0x17
jne 0x4211a9
xor al, al
jmp 0x42148a
call fcn.004051f5
test eax, eax
jne 0x4211b8
cmp dword [ebp + 0xc], 0x47
ja 0x4211a2
lea eax, [esp + 0x44]
push eax
call fcn.00430853
pop ecx
lea eax, [esp + 0x48]
mov ecx, ebp
push eax
call fcn.0042f332
test al, al
je 0x4211f5
push 0xfd8b5938
push 0x273d65f2
push 0xd8c69f44
call fcn.004017ae
push eax
push 2
push dword [ebx + 0x60]
call fcn.0041a053
add esp, 0x18
movzx eax, byte [0x51ba9c]
push esi
push edi
xor esi, esi
mov dword [esp + 0x2c], eax
or edi, 0xffffffff
mov dword [esp + 0x28], esi
test eax, eax
je 0x4213d6
mov ecx, dword [esp + 0x2c]
mov eax, 0x51be60
mov dword [esp + 0x10], eax
movzx eax, word [eax]
cmp edi, eax
je 0x4213be
lea ecx, [esp + 0x24]
mov edi, eax
push ecx
lea ecx, [esp + 0x3c]
mov dword [esp + 0x20], edi
push ecx
lea ecx, [esp + 0x50]
push ecx
lea ecx, [esp + 0x20]
push ecx
push eax
mov ecx, ebp
call fcn.0042f278
test eax, eax
je 0x4213ba
mov cl, byte [0x51ba9c]
xor edi, edi
movzx eax, cl
mov edx, esi
mov dword [esp + 0x30], edi
mov dword [esp + 0x20], edx
cmp esi, eax
jae 0x4212e7
mov edx, dword [esp + 0x10]
add edx, 4
mov dword [esp + 0x44], edx
movzx eax, word [edx - 4]
cmp dword [esp + 0x1c], eax
jne 0x4212c4
mov eax, dword [edx]
mov dword [esp + 0x34], eax
test eax, eax
je 0x4212c4
mov cl, byte [edx - 2]
or esi, 0xffffffff
push eax
shl esi, cl
call fcn.0042f138
mov edi, eax
pop ecx
mov dword [esp + 0x30], edi
cmp dword [esp + 0x48], esi
jne 0x4212b6
mov ecx, dword [esp + 0x34]
and eax, dword [esp + 0x14]
and ecx, edi
cmp eax, ecx
je 0x4212d9
mov cl, byte [0x51ba9c]
mov edx, dword [esp + 0x44]
mov esi, dword [esp + 0x20]
inc esi
movzx eax, cl
add edx, 0x18
mov dword [esp + 0x20], esi
mov dword [esp + 0x44], edx
cmp esi, eax
jb 0x421279
jmp 0x4212df
mov cl, byte [0x51ba9c]
mov edx, dword [esp + 0x20]
mov esi, dword [esp + 0x28]
movzx eax, cl
cmp edx, eax
jae 0x4213b6
lea eax, [esp + 0xb8]
push eax
lea eax, [esp + 0xac]
push eax
lea eax, [esp + 0xe0]
push eax
mov eax, dword [esp + 0x1c]
add eax, 8
push eax
call fcn.00424c9e
add esp, 0x10
jmp 0x421385
push 0x1f
pop ecx
xor eax, eax
inc eax
shl eax, cl
test edi, eax
je 0x42132b
dec ecx
jns 0x42131f
test ecx, ecx
js 0x421341
xor eax, eax
lea esi, [esp + 0xa8]
inc eax
shl eax, cl
test dword [esp + 0x14], eax
jne 0x421348
lea esi, [esp + 0xd8]
lea edi, [esp + 0xc8]
movsd dword es:[edi], dword [esi]
lea eax, [esp + 0xb8]
push eax
lea eax, [esp + 0xac]
push eax
movsd dword es:[edi], dword [esi]
lea eax, [esp + 0xe0]
push eax
lea eax, [esp + 0xd4]
push eax
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
call fcn.00424c9e
mov edi, dword [esp + 0x40]
add esp, 0x10
sar edi, 1
mov dword [esp + 0x30], edi
cmp edi, dword [esp + 0x38]
jne 0x42131c
push dword [esp + 0x40]
lea eax, [esp + 0xbc]
push dword [ebp + 0x20]
push dword [esp + 0x1c]
push dword [esp + 0x30]
push eax
call fcn.004247b8
add esp, 0x14
test al, al
jne 0x4214a3
mov esi, dword [esp + 0x28]
mov edi, dword [esp + 0x1c]
mov ecx, dword [esp + 0x2c]
mov eax, dword [esp + 0x10]
inc esi
add eax, 0x18
mov dword [esp + 0x28], esi
mov dword [esp + 0x10], eax
cmp esi, ecx
jb 0x421220
mov esi, dword [ebp + 0x30]
add esi, dword [ebp + 4]
mov eax, dword [ebp + 0x34]
and dword [esp + 0x14], 0
add eax, esi
cmp dword [0x51ba98], 0
mov dword [esp + 0x24], eax
jbe 0x421467
mov dword [esp + 0x1c], 0x51baa0
push 0
mov ecx, ebp
call fcn.0042f126
mov edi, esi
mov dword [esp + 0x10], eax
cmp esi, dword [esp + 0x24]
jae 0x421451
mov al, byte [edi]
mov byte [esp + 0x1b], al
lea eax, [edi + 1]
push eax
call fcn.00424b90
push dword [esp + 0x44]
mov dword [esp + 0x3c], eax
push dword [ebp + 0x20]
push eax
push dword [esp + 0x20]
push dword [esp + 0x30]
call fcn.004247b8
add esp, 0x18
test al, al
jne 0x4214fa
add dword [esp + 0x10], 0x10
add edi, 5
cmp edi, dword [esp + 0x24]
jb 0x421410
mov eax, dword [esp + 0x14]
add dword [esp + 0x1c], 0x10
inc eax
mov dword [esp + 0x14], eax
cmp eax, dword [0x51ba98]
jb 0x4213fb
mov dword [ebx + 0x74], 0x1a
mov al, byte [ebx + 0x26]
mov byte [ebx + 0x78], al
mov al, byte [ebx + 0x30]
mov byte [ebx + 0x79], al
mov al, byte [ebx + 0x31]
mov byte [ebx + 0x7a], al
call dword [sym.imp.VMProtectSDK32.dll_VMProtectEnd]
xor al, al
pop edi
pop esi
mov ecx, dword [esp + 0xe0]
pop ebp
pop ebx
xor ecx, esp
call fcn.004b35e5
add esp, 0xdc
ret 0xc
mov ebx, dword [esp + 0x3c]
mov esi, dword [esp + 0x24]
mov eax, dword [ebx + 8]
lea edi, [ebx + 0xd0]
and eax, 0xffffffdf
or eax, 0x10
mov dword [ebx + 8], eax
or eax, 0x80000
imul edx, dword [esp + 0x28], 0x18
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ebx + 8], eax
lea esi, [edx + 0x51be68]
lea edi, [ebx + 0x28]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov ecx, dword [edx + 0x51be64]
mov dword [ebx + 0x38], ecx
mov cx, word [edx + 0x51be60]
mov word [ebx + 0x3c], cx
mov cl, byte [edx + 0x51be62]
mov byte [ebx + 0x3e], cl
jmp 0x421542
mov ecx, dword [esp + 0x3c]
mov esi, dword [esp + 0x10]
mov eax, dword [ecx + 8]
lea edi, [ecx + 0xd0]
and eax, 0xffffffef
or eax, 0x20
mov dword [ecx + 8], eax
or eax, 0x80000
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov esi, dword [esp + 0x14]
lea edi, [ecx + 0x28]
shl esi, 4
add esi, 0x51baa0
mov dword [ecx + 8], eax
mov eax, dword [esp + 0x34]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
movsd dword es:[edi], dword [esi]
mov dword [ecx + 0x38], eax
mov al, byte [esp + 0x1b]
mov byte [ecx + 0x3e], al
mov al, 1
jmp 0x421488