Function at 0x10051670
Capabilities:
Access peb ldr_data
Resolve function by parsing pe exports

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x10063efe
mov eax, dword fs:[0]
push eax
sub esp, 0x84
push ebx
push ebp
push esi
push edi
mov eax, dword [0x100a501c]
xor eax, esp
push eax
lea eax, [esp + 0x98]
mov dword fs:[0], eax
mov esi, ecx
mov ecx, dword [esi + 0x284]
mov eax, dword [ecx]
mov edx, dword [eax + 0x38]
call edx
mov ecx, dword [eax]
mov dword [esp + 0x2c], ecx
mov edx, dword [eax + 4]
mov dword [esp + 0x30], edx
mov ecx, dword [eax + 8]
mov dword [esp + 0x34], ecx
mov edx, dword [eax + 0xc]
mov dword [esp + 0x20], eax
xor eax, eax
lea ecx, [esp + 0x6c]
push ecx
mov dword [esp + 0x70], eax
mov dword [esp + 0x74], eax
mov dword [esp + 0x78], eax
mov dword [esp + 0x7c], eax
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov eax, dword [esi + 4]
push 1
xor edi, edi
push eax
mov dword [esp + 0x44], edx
mov dword [esp + 0x28], edi
mov dword [esp + 0x24], edi
mov dword [esp + 0x78], 0x28
call dword [sym.imp.USER32.dll_MonitorFromWindow]
push eax
call dword [sym.imp.USER32.dll_GetMonitorInfoW]
lea edx, [esp + 0x80]
push edx
lea eax, [esp + 0x40]
push eax
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esi + 0x284]
mov edx, dword [eax + 0x740]
mov ebp, dword [esp + 0x48]
mov ebx, dword [esp + 0x44]
sub ebp, dword [esp + 0x40]
sub ebx, dword [esp + 0x3c]
lea ecx, [eax + 0x740]
mov eax, dword [edx + 0xc]
call eax
test eax, eax
jle 0x10051809
lea esp, [esp]
mov eax, dword [esi + 0x284]
mov edx, dword [eax + 0x740]
lea ecx, [eax + 0x740]
mov eax, dword [edx]
push edi
call eax
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0x10]
push str.MenuElement
call eax
test eax, eax
je 0x100517e9
mov ecx, dword [esi + 0x284]
mov edx, dword [ecx + 0x740]
mov eax, dword [edx]
add ecx, 0x740
push edi
call eax
mov edx, dword [eax]
mov edx, dword [edx + 0x130]
push ebp
push ebx
lea ecx, [esp + 0x2c]
push ecx
mov ecx, eax
call edx
mov eax, dword [esp + 0x28]
add dword [esp + 0x18], eax
mov eax, dword [esp + 0x24]
cmp dword [esp + 0x1c], eax
jge 0x100517e9
mov dword [esp + 0x1c], eax
mov eax, dword [esi + 0x284]
mov edx, dword [eax + 0x740]
lea ecx, [eax + 0x740]
mov eax, dword [edx + 0xc]
inc edi
call eax
cmp edi, eax
jl 0x10051780
mov ecx, dword [esi + 0x284]
mov edx, dword [ecx]
mov eax, dword [edx + 0x1c]
call eax
mov eax, dword [eax]
lea ecx, [esp + 0x4c]
push ecx
push eax
call dword [sym.imp.USER32.dll_GetWindowRect]
mov edx, dword [esp + 0x20]
mov eax, dword [edx + 4]
mov ecx, dword [esp + 0x18]
mov dword [esp + 0x30], eax
add eax, ecx
mov ecx, dword [esi + 0x284]
mov dword [esp + 0x38], eax
mov edx, dword [ecx]
mov eax, dword [edx + 0x1c]
call eax
mov eax, dword [eax]
push 2
lea ecx, [esp + 0x30]
push ecx
xor ebx, ebx
push ebx
push eax
call dword [sym.imp.USER32.dll_MapWindowPoints]
mov ecx, dword [esp + 0x54]
mov eax, dword [esp + 0x1c]
mov edx, ecx
lea ecx, [ecx + eax + 2]
xor eax, eax
test byte [0x100a6d00], 1
mov dword [esp + 0x2c], edx
mov dword [esp + 0x34], ecx
mov byte [esp + 0x17], bl
mov dword [esp + 0x5c], ebx
mov dword [esp + 0x60], eax
mov dword [esp + 0x64], eax
mov dword [esp + 0x68], eax
jne 0x100518c1
or dword [0x100a6d00], 1
mov dword [esp + 0xa0], ebx
call fcn.10053730
push 0x100673b0
call fcn.10062cc5
mov dword [esp + 0xa4], 0xffffffff
mov ecx, dword [esp + 0x38]
mov edx, dword [esp + 0x30]
add esp, 4
mov edi, dword [0x100a6c98]
mov eax, dword [edi + 0x10]
sub eax, dword [edi + 0xc]
sar eax, 2
cmp eax, ebx
jle 0x100519e8
mov ebp, 1
ja 0x100518ed
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
mov eax, dword [edi + 0xc]
mov eax, dword [eax]
cmp eax, ebx
je 0x100519e8
lea ebx, [ebx]
push 0
push 0x100a637c
push 0x100a635c
push 0
push eax
call sub.MSVCR90.dll___RTDynamicCast
mov edi, eax
add esp, 0x14
test edi, edi
je 0x10051962
mov edx, dword [edi + 4]
lea ecx, [esp + 0x5c]
push ecx
push edx
call dword [sym.imp.USER32.dll_GetWindowRect]
mov eax, dword [esp + 0x5c]
cmp eax, dword [esp + 0x54]
mov ecx, dword [esp + 0x60]
mov edi, dword [edi + 4]
setge byte [esp + 0x17]
cmp ecx, dword [esp + 0x58]
mov ecx, dword [esi + 0x284]
mov edx, dword [ecx]
mov eax, dword [edx + 0x1c]
setge bl
call eax
cmp edi, dword [eax]
je 0x100519b2
test bl, bl
jne 0x100519b6
cmp byte [esp + 0x17], bl
jne 0x100519ca
mov edx, dword [0x100a6c98]
mov eax, dword [edx + 0x10]
sub eax, dword [edx + 0xc]
sar eax, 2
cmp ebp, eax
jge 0x10051999
mov ecx, ebp
lea edi, [ebp*4]
inc ebp
mov ebx, edx
cmp ecx, eax
jb 0x1005198b
call dword [sym.imp.MSVCR90.dll__invalid_parameter_noinfo]
mov ecx, dword [ebx + 0xc]
mov eax, dword [edi + ecx]
test eax, eax
jne 0x10051900
mov eax, dword [esp + 0x38]
mov ebx, dword [esp + 0x30]
cmp byte [esp + 0x17], 0
jne 0x100519d2
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x2c]
jmp 0x100519f0
test bl, bl
je 0x10051999
mov ebx, dword [esp + 0x50]
mov eax, ebx
sub ebx, dword [esp + 0x18]
mov dword [esp + 0x38], eax
mov dword [esp + 0x30], ebx
jmp 0x100519a1
mov eax, dword [esp + 0x38]
mov ebx, dword [esp + 0x30]
mov edi, dword [esp + 0x4c]
mov edx, edi
sub edx, dword [esp + 0x1c]
mov ecx, edi
mov dword [esp + 0x34], ecx
mov dword [esp + 0x2c], edx
jmp 0x100519f4
mov eax, dword [esp + 0x38]
mov ebx, dword [esp + 0x30]
mov edi, dword [esp + 0x4c]
cmp eax, dword [esp + 0x48]
jle 0x10051a08
mov eax, ebx
sub ebx, dword [esp + 0x18]
mov dword [esp + 0x38], eax
mov dword [esp + 0x30], ebx
cmp ecx, dword [esp + 0x44]
jle 0x10051a1e
mov ecx, edi
sub edi, dword [esp + 0x1c]
mov dword [esp + 0x34], ecx
mov edx, edi
mov dword [esp + 0x2c], edx
cmp ebx, dword [esp + 0x40]
jge 0x10051a39
mov eax, dword [esp + 0x20]
mov ebx, dword [eax + 4]
mov eax, dword [esp + 0x18]
add eax, ebx
mov dword [esp + 0x30], ebx
mov dword [esp + 0x38], eax
cmp edx, dword [esp + 0x3c]
jge 0x10051a53
mov ecx, dword [esp + 0x54]
mov edi, dword [esp + 0x1c]
mov edx, ecx
add ecx, edi
mov dword [esp + 0x2c], edx
mov dword [esp + 0x34], ecx
sub ecx, edx
sub eax, ebx
mov ebx, ecx
mov ecx, dword [esi + 0x288]
mov edx, dword [ecx]
mov edi, eax
mov eax, dword [edx + 0x15c]
call eax
mov ecx, dword [esi + 0x288]
mov edx, dword [ecx]
lea ebp, [eax + 0xc]
mov eax, dword [edx + 0x15c]
push 0
call eax
mov ecx, dword [eax + 4]
add ecx, dword [ebp]
mov edx, dword [esp + 0x34]
mov eax, dword [esp + 0x30]
add ecx, edi
push ecx
mov ecx, dword [esi + 4]
push ebx
push edx
push eax
push ecx
call dword [sym.imp.USER32.dll_MoveWindow]
mov ecx, dword [esp + 0x98]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebp
pop ebx
mov esp, ebp
pop ebp
ret