Function at 0x30004074
Capabilities:
Enumerate gui resources
Get common file path
Set current directory

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x860
push esi
mov edx, str.SDMFindParent
lea ecx, [ebp - 0x18]
call fcn.30003c4c
push 1
pop esi
cmp eax, esi
jle 0x30004502
lea eax, [ebp - 4]
push eax
mov eax, dword [0x300022c4]
call dword [eax + 0x54]
test eax, eax
jl 0x30004502
push ebx
lea eax, [ebp - 0x40]
push edi
push eax
push dword [ebp - 0x18]
call dword [sym.imp.USER32.dll_GetWindowThreadProcessId]
lea eax, [ebp - 0x40]
xor ebx, ebx
push eax
push 0x30003bb2
mov dword [ebp - 0x3c], ebx
call dword [sym.imp.USER32.dll_EnumWindows]
mov edi, dword [sym.imp.USER32.dll_EnableWindow]
push esi
push dword [ebp - 0x18]
call edi
push esi
push dword [0x300073e8]
call edi
lea eax, [ebp - 0x248]
push 0x208
push eax
mov eax, dword [0x300022c4]
push 0x4000
call dword [eax + 0xd8]
lea eax, [ebp - 0x248]
push eax
mov eax, dword [0x300022c4]
call dword [eax + 0xf0]
cmp word [ebp - 0x248], bx
je 0x30004122
cmp eax, 0xffffffff
je 0x30004122
test al, 0x10
jne 0x30004131
lea eax, [ebp - 0x248]
push eax
mov eax, dword [0x300022c4]
call dword [eax + 0x50]
cmp word [ebp - 0x248], bx
je 0x3000415b
lea eax, [ebp - 0x248]
push eax
mov eax, dword [0x300022c4]
call dword [eax + 0x4c]
mov edi, eax
push edi
call dword [sym.imp.KERNEL32.dll_SetCurrentDirectoryA]
mov eax, dword [0x300022c4]
push edi
call dword [eax + 0x28]
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x248]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + pe_nt_image_headers32]
lea eax, [ebp - 0x38]
push eax
mov eax, dword [0x300022c4]
push 0x4001
call dword [eax + 0xd4]
mov edi, dword [sym.imp.USER32.dll_GetSystemMetrics]
test eax, eax
jne 0x30004197
push ebx
call edi
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x38], eax
lea eax, [ebp - 0x34]
push eax
mov eax, dword [0x300022c4]
push 0x4002
call dword [eax + 0xd4]
test eax, eax
jne 0x300041bc
push esi
call edi
cdq
sub eax, edx
sar eax, 1
mov dword [ebp - 0x34], eax
jmp 0x300041bf
mov eax, dword [ebp - 0x34]
mov ecx, dword [ebp - 4]
push eax
push dword [ebp - 0x38]
mov edx, dword [ecx]
push ecx
call dword [edx + 0x84]
mov eax, dword [0x300022c4]
push 0x4003
call dword [eax + 0xd0]
mov ecx, dword [ebp - 4]
push eax
push ecx
mov edx, dword [ecx]
call dword [edx + 0xe4]
mov eax, dword [ebp - 4]
push ebx
push ebx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
mov eax, dword [ebp - 4]
push 0x3000405a
push eax
mov ecx, dword [eax]
call dword [ecx + 0x6c]
mov eax, dword [ebp - 4]
lea edx, [ebp - 0xc]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc8]
mov eax, dword [0x300022c4]
mov edi, 0x4009
push edi
mov dword [ebp - 0x14], ebx
call dword [eax + 0xdc]
cmp eax, ebx
mov dword [ebp - 8], eax
jbe 0x30004269
push eax
lea eax, [ebp - 0x14]
push eax
mov eax, dword [0x300022c4]
call dword [eax + 0x30]
test eax, eax
je 0x30004269
push dword [ebp - 8]
mov eax, dword [0x300022c4]
push dword [ebp - 0x14]
push edi
call dword [eax + 0xd8]
mov edx, dword [ebp - 0x14]
mov ecx, dword [ebp - 0xc]
call fcn.30004014
mov eax, dword [0x300022c4]
push dword [ebp - 0x14]
call dword [eax + 0x28]
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
test eax, eax
jne 0x3000429a
lea eax, [ebp - 0x658]
push 0x410
push eax
mov eax, dword [0x300022c4]
push 0xd
call dword [eax + 0x7c]
mov ecx, dword [ebp - 0xc]
lea edx, [ebp - 0x658]
call fcn.30004014
mov eax, dword [ebp - 0xc]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x24]
mov eax, dword [ebp - 0xc]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov edi, 0x104
lea eax, [ebp - 0x860]
push edi
push eax
mov eax, dword [0x300022c4]
push 3
call dword [eax + 0x7c]
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x860]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x74]
mov eax, dword [ebp - 4]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x34]
mov eax, dword [ebp - 4]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x11c]
mov eax, dword [ebp - 4]
push esi
push eax
mov ecx, dword [eax]
call dword [ecx + 0x3c]
mov eax, dword [ebp - 4]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x110]
push ebx
call dword [sym.imp.ole32.dll_CoInitialize]
xor ecx, ecx
lea edx, [ebp - 0x2c]
test eax, eax
mov eax, dword [ebp - 4]
push edx
setge cl
mov dword [ebp - 8], ecx
mov ecx, dword [eax]
push eax
call dword [ecx + 0xd0]
mov eax, dword [ebp - 0x2c]
push esi
push 2
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
mov eax, dword [ebp - 0x2c]
push esi
push 8
mov ecx, dword [eax]
push eax
call dword [ecx + 0x24]
mov eax, dword [ebp - 0x2c]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 4]
push 0xffffffffffffffff
push ebx
mov ecx, dword [eax]
push esi
push eax
call dword [ecx + 0x13c]
mov eax, dword [ebp - 4]
or dword [ebp - 0x30], 0xffffffff
push dword [ebp - 0x18]
lea edx, [ebp - 0x30]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x88]
cmp dword [ebp - 8], ebx
je 0x30004375
call dword [sym.imp.ole32.dll_CoUninitialize]
mov eax, dword [ebp - 0x30]
cmp eax, esi
je 0x30004452
jle 0x300044d4
cmp eax, 5
jle 0x30004394
cmp eax, 7
jne 0x300044d4
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0xc4]
mov eax, dword [ebp - 8]
lea edx, [ebp - 0x20]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0x1c]
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [eax]
call dword [ecx + 0x10]
cmp eax, ebx
mov dword [ebp - 0x28], eax
mov dword [ebp - 0x10], ebx
jle 0x30004440
mov eax, dword [ebp - 0x20]
lea edx, [ebp - 0x24]
push edx
mov dword [ebp - 0x24], ebx
push dword [ebp - 0x10]
mov ecx, dword [eax]
push eax
call dword [ecx + 0x14]
test eax, eax
jl 0x30004435
mov eax, dword [ebp - 0x24]
lea edx, [ebp - 0x450]
push 0x208
push edx
mov ecx, dword [eax]
push eax
call dword [ecx + 0x10]
test eax, eax
jl 0x3000442c
call fcn.300047e2
cmp dword [ebp - 0x30], 7
lea edx, [ebp - 0x450]
mov ecx, 0x3000405e
je 0x3000440f
mov ecx, 0x3000406a
call fcn.30004a8e
mov dword [ebp - 0x1c], eax
call fcn.300046bc
cmp dword [ebp - 0x1c], ebx
jne 0x3000442c
push 6
pop edx
push 3
pop ecx
call fcn.300045a4
mov eax, dword [ebp - 0x24]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
inc dword [ebp - 0x10]
mov eax, dword [ebp - 0x10]
cmp eax, dword [ebp - 0x28]
jl 0x300043c4
mov eax, dword [ebp - 0x20]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
mov eax, dword [ebp - 8]
push eax
mov ecx, dword [eax]
call dword [ecx + 8]
lea eax, [ebp - 0x34c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetCurrentDirectoryA]
lea eax, [ebp - 0x34c]
push eax
mov eax, dword [0x300022c4]
push 0x4000
call dword [eax + 0xc8]
mov eax, dword [ebp - 4]
lea edx, [ebp - 8]
push edx
lea edx, [ebp - 0x28]
mov ecx, dword [eax]
push edx
push eax
call dword [ecx + 0x80]
mov eax, dword [0x300022c4]
push dword [ebp - 0x28]
push 0x4001
call dword [eax + 0xc4]
mov eax, dword [0x300022c4]
push dword [ebp - 8]
push 0x4002
call dword [eax + 0xc4]
mov eax, dword [ebp - 4]
lea edx, [ebp - 0x1c]
push edx
push eax
mov ecx, dword [eax]
call dword [ecx + 0xe8]
mov eax, dword [0x300022c4]
push dword [ebp - 0x1c]
push 0x4003
call dword [eax + 0xc4]
mov eax, dword [ebp - 4]
pop edi
cmp eax, ebx
pop ebx
je 0x300044e3
mov ecx, dword [eax]
push eax
call dword [ecx + 8]
mov ecx, dword [ebp - 0x18]
mov edx, str.SDMFindParent
call fcn.30003d16
lea eax, [ebp - 0x40]
mov dword [ebp - 0x3c], esi
push eax
push 0x30003bb2
call dword [sym.imp.USER32.dll_EnumWindows]
pop esi
leave
ret