Function at 0x10020e5
Capabilities:
Check if file exists
Enumerate gui resources
Get file attributes

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push edi
push 0
call dword [sym.imp.KERNEL32.dll_SetLastError]
cmp dword [ebp + 8], 0
jne 0x1002109
push 0x57
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10022c8
push 0x1c
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov dword [ebp - 8], eax
cmp dword [ebp - 8], 0
jne 0x100212b
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10022c8
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 4], eax
cmp dword [ebp - 4], 0
jne 0x100214c
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10022c8
mov eax, dword [ebp - 4]
and dword [eax + 0x14], 0
mov edi, dword [ebp + 8]
or ecx, 0xffffffff
xor eax, eax
repne scasb al, byte es:[edi]
not ecx
push ecx
push 0x42
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ecx, dword [ebp - 4]
mov dword [ecx + 0x18], eax
mov eax, dword [ebp - 4]
cmp dword [eax + 0x18], 0
jne 0x1002198
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10022c8
mov eax, dword [ebp - 4]
push dword [eax + 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x14], eax
cmp dword [ebp - 0x14], 0
jne 0x10021ce
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 8
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10022c8
push dword [ebp + 8]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_lstrcpyA]
mov eax, dword [ebp - 4]
push dword [eax + 0x18]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 0x14]
call dword [sym.imp.KERNEL32.dll_GetFileAttributesA]
mov dword [ebp - 0xc], eax
cmp dword [ebp - 0xc], 0xffffffff
jne 0x1002211
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x10022c8
mov eax, dword [ebp - 0xc]
and eax, 0x17
test eax, eax
je 0x100223c
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
push 0x13
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10022c8
cmp dword [ebp + 0xc], 0
jne 0x100229d
push 3
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov dword [ebp - 0x10], eax
cmp dword [ebp - 0x10], 0
jne 0x1002283
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jne 0x100227f
push 0xc1
call dword [sym.imp.KERNEL32.dll_SetLastError]
xor eax, eax
jmp 0x10022c8
push dword [ebp - 4]
push 0x100268a
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_EnumResourceTypesA]
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 4]
cmp dword [eax + 0x14], 0
je 0x10022bc
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalFree]
xor eax, eax
jmp 0x10022c8
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [ebp - 8]
pop edi
leave
ret 8