Function at 0x180051500
Capabilities:
Enumerate gui resources

Disassembly:
push rbp
push rbx
push rsi
push rdi
lea rbp, [rsp - 0x138]
sub rsp, 0x238
mov qword [rbp - 0x40], 0xfffffffffffffffe
mov rax, qword [0x180001b10]
xor rax, rsp
mov qword [rbp + 0x120], rax
mov eax, r9d
mov dword [rsp + 0x54], eax
mov dword [rsp + 0x44], r8d
mov r9, rdx
mov qword [rsp + 0x58], rdx
mov rsi, rcx
cmp dword [rcx + 0x60], 0
jge 0x180051e76
mov eax, dword [rsp + 0x50]
mov dword [rsp + 0x60], eax
nop word [rax + rax]
mov rdi, r9
mov qword [rbp - 0x80], r9
mov ebx, r8d
mov qword [rsp + 0x70], rbx
cmp byte [rsi + 0x5a], 0
je 0x1800515e4
cmp byte [rsi + 0x5b], 0
je 0x180051594
movsxd r8, r8d
lea rcx, [rsi + 0x78]
mov rdx, r9
call fcn.18002ecc0
mov r8d, dword [rsp + 0x44]
mov r9, qword [rsp + 0x58]
add dword [rsi + 0x98], r8d
mov eax, dword [rsi + 0x98]
cmp eax, dword [rsi + 0x68]
setge byte [rsp + 0x40]
cmp byte [rsp + 0x40], 0
je 0x18005197d
mov byte [rsi + 0x5a], 0
cmp byte [rsi + 0x5b], 0
je 0x18005194a
lea rdi, [rsi + 0x78]
mov qword [rbp - 0x80], rdi
cmp qword [rdi + 0x18], 0x10
jb 0x1800515d8
mov rdi, qword [rdi]
mov qword [rbp - 0x80], rdi
mov rbx, qword [rsi + 0x88]
mov qword [rsp + 0x70], rbx
lea rax, [rsp + 0x68]
mov qword [rsp + 0x28], rax
lea rax, [rsp + 0x4c]
mov qword [rsp + 0x20], rax
lea r9, [rsp + 0x64]
mov r8d, dword [rsi + 0xc]
mov edx, ebx
mov rcx, rdi
call fcn.180095520
test al, al
jne 0x180051b1a
mov eax, dword [rsi + 0xc]
add eax, 0xfffffffe
cmp eax, 1
jbe 0x180051680
cmp ebx, 9
jge 0x180051632
xor al, al
mov edx, dword [rsp + 0x4c]
mov dword [rsp + 0x48], edx
jmp 0x1800516d8
mov ecx, dword [rdi]
call qword [sym.imp.WS2_32.dll_ntohl]
mov ebx, eax
shr ebx, 8
movzx edi, byte [rdi + 3]
mov rax, qword [rbp - 0x80]
movzx ecx, byte [rax + 4]
mov byte [rsp + 0x40], cl
mov ecx, dword [rax + 5]
call qword [sym.imp.WS2_32.dll_ntohl]
btr eax, 0x1f
mov dword [rsp + 0x60], eax
mov dword [rsp + 0x50], eax
lea edx, [rbx + 9]
mov dword [rsp + 0x48], edx
mov dword [rsp + 0x4c], edx
and byte [rsp + 0x40], 1
test di, di
sete al
mov rdi, qword [rbp - 0x80]
jmp 0x1800516d8
cmp ebx, 8
jl 0x18005169c
cmp byte [rdi], 0x80
jne 0x18005169c
cmp byte [rdi + 1], 3
jne 0x18005169c
xor al, al
mov edx, dword [rsp + 0x4c]
mov dword [rsp + 0x48], edx
jmp 0x1800516d8
mov ecx, dword [rdi]
call qword [sym.imp.WS2_32.dll_ntohl]
btr eax, 0x1f
mov dword [rsp + 0x60], eax
mov dword [rsp + 0x50], eax
mov ecx, dword [rdi + 4]
call qword [sym.imp.WS2_32.dll_ntohl]
and eax, 0xffffff
add eax, 8
mov dword [rsp + 0x48], eax
mov dword [rsp + 0x4c], eax
cmp byte [rdi + 4], 1
sete byte [rsp + 0x40]
mov al, 1
mov edx, dword [rsp + 0x48]
test al, al
je 0x180051ad5
mov rax, qword [rsi + 0x38]
mov rcx, qword [rax + 8]
mov r8, rax
mov r9d, dword [rsp + 0x60]
cmp byte [rcx + 0x19], 0
jne 0x18005170e
cmp dword [rcx + 0x20], r9d
jge 0x180051702
mov rcx, qword [rcx + 0x10]
jmp 0x180051708
mov r8, rcx
mov rcx, qword [rcx]
cmp byte [rcx + 0x19], 0
je 0x1800516f6
cmp r8, rax
je 0x180051729
cmp r9d, dword [r8 + 0x20]
jl 0x180051729
mov qword [rbp + 0xf0], r8
lea rbx, [rbp + 0xf0]
jmp 0x180051733
mov qword [rsp + 0x78], rax
lea rbx, [rsp + 0x78]
mov rbx, qword [rbx]
mov rax, qword [rsp + 0x70]
cmp rbx, qword [rsi + 0x38]
je 0x180051a93
mov dword [rsi + 8], r9d
mov ecx, dword [rsp + 0x48]
cmp eax, ecx
jl 0x180051a1f
mov word [rsi + 0x59], 0
mov eax, dword [rsi + 0xc]
add eax, 0xfffffffe
cmp eax, 1
jbe 0x180051789
mov edx, 9
lea r8d, [rcx - 9]
test byte [rdi + 4], 8
je 0x180051792
mov edx, 0xa
movzx eax, byte [rdi + 9]
mov r8d, ecx
sub r8d, eax
sub r8d, edx
jmp 0x180051792
mov edx, 8
lea r8d, [rcx - 8]
mov rcx, qword [rbx + 0x28]
movsxd rdx, edx
add rdx, rdi
add rcx, 0x28
call fcn.180073720
test al, al
je 0x1800519ba
cmp byte [rsp + 0x40], 0
je 0x1800518ef
mov rax, qword [rbx + 0x28]
mov byte [rax + 0xe0], 1
mov rcx, qword [rbx + 0x28]
mov rdx, qword [rcx + 0x130]
lea r8, [rsi + 0x5d]
add rcx, 0x28
mov r9b, 1
call fcn.18003dc90
cmp dword [reloc.WS2_32.dll_ioctlsocket], 0
jne 0x180051820
cmp byte [rsi + 0x5c], 0
je 0x180051820
cmp byte [rsi + 0x5d], 0
jne 0x180051820
mov eax, dword [0x180002bf0]
test eax, eax
jne 0x180051818
xor edx, edx
lea rcx, [0x180078840]
call qword [sym.imp.USER32.dll_EnumWindows]
mov dword [0x180002bf0], 5
jmp 0x180051820
dec eax
mov dword [0x180002bf0], eax
mov rdx, qword [rbx + 0x28]
xor eax, eax
mov qword [rbp + 0x110], rax
mov qword [rbp + 0x118], rax
mov qword [rbp + 0x118], reloc.WS2_32.dll_ntohs
mov qword [rbp + 0x110], rax
mov byte [rbp + 0x100], al
add rdx, 0xc0
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rcx, [rbp + 0x100]
call fcn.18002ffe0
nop
lea rax, [rbp - 0x78]
mov qword [rbp - 0x80], rax
mov qword [rbp - 0x60], reloc.WS2_32.dll_ntohs
mov qword [rbp - 0x68], 0
mov byte [rbp - 0x78], 0
or r9, 0xffffffffffffffff
xor r8d, r8d
lea rdx, [rbp + 0x100]
lea rcx, [rbp - 0x78]
call fcn.18002ffe0
nop
mov r9, qword [rbx + 0x28]
lea rax, [rsi + 0x70]
mov qword [rsp + 0x20], rax
mov r8d, dword [rsi + 0xc]
mov edx, dword [rbx + 0x20]
lea rcx, [rbp - 0x78]
call fcn.1800950d0
mov byte [rsi + 0x59], 1
cmp qword [rbp + 0x118], 0x10
jb 0x1800518d2
mov rcx, qword [rbp + 0x100]
call fcn.1800958e0
mov qword [rbp + 0x118], reloc.WS2_32.dll_ntohs
mov qword [rbp + 0x110], 0
mov byte [rbp + 0x100], 0
movsxd rdx, dword [rsp + 0x48]
mov rax, qword [rsp + 0x70]
cmp eax, edx
jle 0x1800519a5
mov r8d, eax
sub r8d, edx
mov dword [rsp + 0x44], r8d
add rdi, rdx
movsxd rdx, r8d
mov r9, qword [rsp + 0x58]
test r8d, r8d
jle 0x18005193f
mov rcx, r9
sub rdi, r9
nop dword [rax]
nop word [rax + rax]
movzx eax, byte [rdi + rcx]
mov byte [rcx], al
lea rcx, [rcx + 1]
dec rdx
jne 0x180051930
cmp dword [rsi + 0x60], 0
jge 0x18005199c
jmp 0x180051560
sub eax, dword [rsi + 0x68]
test eax, eax
jle 0x180051994
sub r8d, eax
mov dword [rsp + 0x44], r8d
mov ecx, dword [rsp + 0x54]
sub ecx, r8d
movsxd rdx, r8d
add rdx, r9
mov r9d, ecx
mov r8d, eax
mov rcx, rsi
call fcn.180051500
add eax, dword [rsp + 0x44]
jmp 0x180051e84
mov ecx, dword [rsi + 8]
test ecx, ecx
jle 0x180051994
mov r8, r9
mov edx, dword [rsi + 0xc]
call fcn.1800952b0
jmp 0x180051e84
mov eax, r8d
jmp 0x180051e84
mov eax, dword [rsp + 0x54]
jmp 0x180051e76
mov r8, qword [rsp + 0x58]
mov edx, dword [rsi + 0xc]
mov ecx, dword [rsi + 8]
call fcn.1800952b0
jmp 0x180051e84
lea rdx, [0x18010906d]
lea rcx, [rbp - 0x10]
call fcn.18001d6c0
nop
lea rdx, [rsp + 0x50]
mov rcx, rax
call fcn.180055b90
mov rdx, rax
lea rcx, [rbp - 0x38]
call fcn.18001d880
nop
cmp qword [rax + 0x18], 0x10
jb 0x1800519ef
mov rax, qword [rax]
mov qword [rsp + 0x78], rax
lea rdx, [rsp + 0x78]
lea rcx, [rbp - 0x58]
call fcn.1800b8b10
nop
lea rax, vtable.message_exception.0
mov qword [rbp - 0x58], rax
lea rdx, [0x180160cf8]
lea rcx, [rbp - 0x58]
call fcn.1800bef68
nop
mov dword [rsi + 0x68], ecx
lea rcx, [rsi + 0x78]
xor r8d, r8d
mov qword [rcx + 0x10], r8
cmp qword [rcx + 0x18], 0x10
jb 0x180051a39
mov rdx, qword [rcx]
jmp 0x180051a3c
mov rdx, rcx
mov byte [rdx], r8b
mov dword [rsi + 0x98], r8d
mov word [rsi + 0x5a], 0x101
movzx r8d, byte [rsp + 0x40]
mov byte [rsi + 0x59], r8b
movsxd r8, eax
mov rdi, qword [rsp + 0x58]
mov rdx, rdi
call fcn.18002ecc0
mov rcx, qword [rsp + 0x70]
add ecx, dword [rsi + 0x98]
mov dword [rsi + 0x98], ecx
cmp ecx, dword [rsi + 0x68]
jl 0x180051a80
mov byte [rsi + 0x5a], 0
mov r8, rdi
mov edx, dword [rsi + 0xc]
mov ecx, dword [rsi + 8]
call fcn.1800952b0
jmp 0x180051e84
xor r8d, r8d
mov dword [rsi + 8], r8d
cmp eax, edx
jge 0x180051ade
mov dword [rsi + 0x68], edx
lea rcx, [rsi + 0x78]
mov qword [rcx + 0x10], r8
cmp qword [rcx + 0x18], 0x10
jb 0x180051ab3
mov rcx, qword [rcx]
mov byte [rcx], r8b
mov word [rsi + 0x5a], 1
movzx r8d, byte [rsp + 0x40]
mov byte [rsi + 0x59], r8b
mov dword [rsi + 0x98], eax
cmp eax, dword [rsi + 0x68]
jl 0x180051ad5
mov byte [rsi + 0x5a], 0
mov eax, dword [rsp + 0x44]
jmp 0x180051e84
mov byte [rsi + 0x5a], r8b
movzx r8d, byte [rsp + 0x40]
mov byte [rsi + 0x59], r8b
sub eax, edx
test eax, eax
jle 0x180051ad5
mov ebx, dword [rsp + 0x44]
sub ebx, eax
mov r9d, dword [rsp + 0x54]
sub r9d, ebx
movsxd rdx, ebx
add rdx, qword [rsp + 0x58]
mov r8d, eax
mov rcx, rsi
call fcn.180051500
add eax, ebx
jmp 0x180051e84
mov eax, dword [rsp + 0x4c]
cmp ebx, eax
jge 0x180051b79
mov dword [rsi + 0x68], eax
mov byte [rsi + 0x5a], 1
lea rcx, [rsi + 0x78]
xor edx, edx
mov qword [rcx + 0x10], rdx
cmp qword [rcx + 0x18], 0x10
jb 0x180051b3f
mov rax, qword [rcx]
jmp 0x180051b42
mov rax, rcx
mov byte [rax], dl
mov dword [rsi + 0x98], edx
mov byte [rsi + 0x5b], 1
movsxd r8, ebx
mov rdx, qword [rsp + 0x58]
call fcn.18002ecc0
mov edx, dword [rsi + 0x98]
add edx, ebx
mov dword [rsi + 0x98], edx
cmp edx, dword [rsi + 0x68]
jl 0x180051b72
mov byte [rsi + 0x5a], 0
mov eax, ebx
jmp 0x180051e84
mov eax, dword [rsi + 0xc]
cmp eax, 2
jl 0x180051e45
cmp eax, 3
jle 0x180051ba0
cmp eax, 4
jne 0x180051e45
mov eax, dword [rsp + 0x64]
dec eax
test eax, 0xfffffff7
jmp 0x180051bac
mov eax, dword [rsp + 0x64]
cmp eax, 2
je 0x180051bb2
cmp eax, 8
jne 0x180051e45
xor eax, eax
mov qword [rbp + 0xf0], rax
mov qword [rbp + 0xf8], rax
mov qword [rbp + 0xf0], rax
mov qword [rbp + 0xf8], rax
call fcn.180042050
mov qword [rbp + 0xf0], rax
mov rax, qword [rsi]
mov rcx, rsi
call qword [rax + select]
mov rbx, rax
mov rdx, qword [rsi]
mov rcx, rsi
call qword [rdx + reloc.WS2_32.dll_htonl]
mov r9, rax
lea rax, [rbp + 0xf0]
mov qword [rsp + 0x38], rax
lea rax, [rsp + 0x50]
mov qword [rsp + 0x30], rax
lea rax, [rsp + 0x64]
mov qword [rsp + 0x28], rax
mov qword [rsp + 0x20], rbx
mov r8d, dword [rsi + 0xc]
mov rbx, qword [rsp + 0x70]
mov edx, ebx
mov rcx, rdi
call fcn.180095650
test eax, eax
jle 0x180051c57
cmp qword [rbp + 0xf8], 0
jbe 0x180051d77
mov r8d, dword [rsp + 0x50]
lea rdx, [rbp + 0xf0]
mov rcx, rsi
call fcn.180053230
jmp 0x180051d77
cmp byte [rsi + 0x58], 0
jne 0x180051d77
mov ecx, dword [rsp + 0x50]
mov eax, ecx
and eax, 0x80000001
jge 0x180051c75
dec eax
or eax, 0xfffffffe
inc eax
cmp eax, 1
jne 0x180051d77
lea eax, [rcx - 2]
test eax, eax
mov ecx, 0
cmovs eax, ecx
mov dword [rsi + 0x60], eax
mov dword [rsi + 0x64], ecx
cmp dword [rsp + 0x44], ebx
jne 0x180051d77
mov r8d, dword [rsp + 0x54]
mov rdx, qword [rsp + 0x58]
mov rcx, rsi
call fcn.180051470
mov esi, eax
mov rdi, qword [rbp + 0xf0]
mov rbx, qword [rdi]
cmp rbx, rbx
jne 0x180051cf9
mov rdx, qword [rdi + 8]
lea rcx, [rbp + 0xf0]
call fcn.180041a80
mov rax, qword [rbp + 0xf0]
mov qword [rax + 8], rax
mov rax, qword [rbp + 0xf0]
mov qword [rax], rax
mov rax, qword [rbp + 0xf0]
mov qword [rax + 0x10], rax
xor eax, eax
mov qword [rbp + 0xf8], rax
jmp 0x180051d64
cmp rbx, rdi
je 0x180051d64
nop
mov r8, rbx
cmp byte [rbx + 0x19], 0
jne 0x180051d4e
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
jne 0x180051d2e
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
jne 0x180051d4e
nop
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x180051d20
jmp 0x180051d4e
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x180051d4b
cmp rbx, qword [rax + 0x10]
jne 0x180051d4b
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x180051d38
mov rbx, rax
lea rdx, [rsp + 0x78]
lea rcx, [rbp + 0xf0]
call fcn.18003fbd0
cmp rbx, rdi
jne 0x180051d00
mov rcx, qword [rbp + 0xf0]
call fcn.1800958e0
mov eax, esi
jmp 0x180051e84
mov rdi, qword [rbp + 0xf0]
mov rbx, qword [rdi]
cmp rbx, rbx
jne 0x180051dc1
mov rdx, qword [rdi + 8]
lea rcx, [rbp + 0xf0]
call fcn.180041a80
mov rax, qword [rbp + 0xf0]
mov qword [rax + 8], rax
mov rax, qword [rbp + 0xf0]
mov qword [rax], rax
mov rax, qword [rbp + 0xf0]
mov qword [rax + 0x10], rax
xor eax, eax
mov qword [rbp + 0xf8], rax
jmp 0x180051e34
cmp rbx, rdi
je 0x180051e34
mov r8, rbx
cmp byte [rbx + 0x19], 0
jne 0x180051e1e
mov rax, qword [rbx + 0x10]
cmp byte [rax + 0x19], 0
jne 0x180051dfe
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
jne 0x180051e1e
nop word [rax + rax]
mov rbx, rax
mov rax, qword [rax]
cmp byte [rax + 0x19], 0
je 0x180051df0
jmp 0x180051e1e
mov rax, qword [rbx + 8]
cmp byte [rax + 0x19], 0
jne 0x180051e1b
cmp rbx, qword [rax + 0x10]
jne 0x180051e1b
mov rbx, rax
mov rax, qword [rax + 8]
cmp byte [rax + 0x19], 0
je 0x180051e08
mov rbx, rax
lea rdx, [rsp + 0x78]
lea rcx, [rbp + 0xf0]
call fcn.18003fbd0
cmp rbx, rdi
jne 0x180051dc6
mov rcx, qword [rbp + 0xf0]
call fcn.1800958e0
mov rbx, qword [rsp + 0x70]
sub ebx, dword [rsp + 0x4c]
test ebx, ebx
jle 0x180051ad5
mov edi, dword [rsp + 0x44]
sub edi, ebx
mov r9d, dword [rsp + 0x54]
sub r9d, edi
movsxd rdx, edi
add rdx, qword [rsp + 0x58]
mov r8d, ebx
mov rcx, rsi
call fcn.180051500
add eax, edi
jmp 0x180051e84
mov r8d, eax
mov rdx, r9
mov rcx, rsi
call fcn.180051470
mov rcx, qword [rbp + 0x120]
xor rcx, rsp
call fcn.1800b8aa0
add rsp, 0x238
pop rdi
pop rsi
pop rbx
pop rbp
ret