Function at 0x501380
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x564730
mov eax, dword fs:[0]
push eax
sub esp, 0x54
mov eax, dword [0x5c7cec]
xor eax, ebp
mov dword [ebp - 0x10], eax
push ebx
push esi
push edi
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov edi, ecx
mov dword [ebp - 0x4c], edi
movzx esi, word [ebp + 8]
push 0xf0
push esi
push dword [0x5cdd90]
call dword [sym.imp.kernel32.dll_FindResourceW]
xor ecx, ecx
mov dword [ebp - 0x44], ecx
mov dword [ebp - 0x30], ecx
test eax, eax
je 0x5013ed
push eax
push dword [0x5cdd90]
call dword [sym.imp.kernel32.dll_LoadResource]
test eax, eax
je 0x5013ed
push eax
call dword [sym.imp.kernel32.dll_LockResource]
mov dword [ebp - 0x44], eax
push 5
push esi
push dword [0x5cdd90]
call dword [sym.imp.kernel32.dll_FindResourceW]
test eax, eax
je 0x50185e
push eax
push dword [0x5cdd90]
call dword [sym.imp.kernel32.dll_LoadResource]
test eax, eax
je 0x501850
push eax
call dword [sym.imp.kernel32.dll_LockResource]
mov edx, eax
test edx, edx
je 0x501850
movzx ecx, word [edx + 2]
mov ebx, 0xffff
mov esi, ecx
movzx eax, si
mov dword [ebp - 0x58], eax
xor eax, eax
cmp cx, bx
mov dword [ebp - 0x40], esi
push edx
sete al
mov dword [ebp - 0x60], eax
xor eax, eax
cmp cx, bx
sete al
lea eax, [eax*8 + 8]
movzx eax, word [eax + edx]
mov dword [ebp - 0x54], eax
call main
add esp, 4
mov ebx, eax
mov dword [ebp - 0x50], ebx
push 5
push dword [edi + 4]
call dword [sym.imp.USER32.dll_GetWindow]
mov edi, eax
xor ecx, ecx
xor eax, eax
mov dword [ebp - 0x34], edi
mov dword [ebp - 0x3c], ecx
cmp ax, word [ebp - 0x54]
jae 0x50185e
nop
mov edx, 0xffff
cmp si, dx
jne 0x50149f
mov esi, dword [ebx + 0x14]
jmp 0x5014a3
movzx esi, word [ebx + 0x10]
cmp word [ebp - 0x58], dx
mov eax, 0x18
mov edx, 0x12
cmovne eax, edx
cmp word [eax + ebx], 0x7b
jne 0x5017d4
mov ecx, dword [ebp - 0x44]
mov eax, ecx
mov dword [ebp - 0x30], 0
test ecx, ecx
je 0x5014ee
nop
movzx ecx, word [eax]
add eax, 2
mov dword [ebp - 0x38], eax
movzx edi, word [eax]
mov edx, dword [eax + 2]
add eax, 6
cmp ecx, esi
je 0x5015b7
add eax, edx
jne 0x5014d0
xor esi, esi
xor eax, eax
mov dword [ebp - 0x14], eax
mov dword [ebp - 4], eax
test esi, esi
je 0x501554
push esi
push 0x42
call dword [sym.imp.kernel32.dll_GlobalAlloc]
mov edi, eax
test edi, edi
je 0x50180e
push edi
call dword [sym.imp.kernel32.dll_GlobalLock]
test eax, eax
je 0x5017f6
push esi
push dword [ebp - 0x30]
push esi
push eax
call main
push eax
call main
add esp, 0x14
push edi
call dword [sym.imp.kernel32.dll_GlobalUnlock]
lea eax, [ebp - 0x14]
push eax
push 1
push edi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov dword [ebp - 0x30], eax
test eax, eax
js 0x5017e9
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x48], 0
lea ecx, [ebp - 0x48]
mov byte [ebp - 4], 1
push ecx
push eax
call main
mov edi, dword [ebp - 0x48]
mov esi, eax
add esp, 8
mov dword [ebp - 0x30], esi
test esi, esi
js 0x501782
call main
mov esi, dword [ebp - 0x40]
mov ecx, 0xffff
cmp si, cx
mov eax, 0x18
mov edx, 0x12
cmovne eax, edx
add eax, ebx
mov dword [ebp - 0x38], eax
cmp si, cx
jne 0x5015d3
movzx eax, word [ebx + 0xc]
movsx ecx, ax
movzx eax, word [ebx + 0xe]
movsx edx, ax
movzx eax, word [ebx + 0x10]
jmp 0x5015e5
mov eax, 0x378
cmp di, ax
je 0x5014ee
mov eax, dword [ebp - 0x38]
lea esi, [edx + 6]
mov dword [ebp - 0x30], eax
jmp 0x5014f0
movzx eax, word [ebx + 8]
movsx ecx, ax
movzx eax, word [ebx + 0xa]
movsx edx, ax
movzx eax, word [ebx + 0xc]
cwde
add eax, ecx
mov dword [ebp - 0x28], edx
mov dword [ebp - 0x24], eax
mov eax, 0xffff
mov dword [ebp - 0x2c], ecx
cmp si, ax
jne 0x501601
movzx eax, word [ebx + 0x12]
jmp 0x501605
movzx eax, word [ebx + 0xe]
cwde
add eax, edx
mov dword [ebp - 0x20], eax
lea eax, [ebp - 0x2c]
push eax
mov eax, dword [ebp - 0x4c]
push dword [eax + 4]
call dword [sym.imp.USER32.dll_MapDialogRect]
mov eax, 0xffff
cmp si, ax
jne 0x501633
mov ecx, dword [ebx + 4]
lea esi, [ebx + 8]
mov eax, dword [ebx + 0x14]
mov dword [ebp - 0x30], ecx
jmp 0x501640
movzx eax, word [ebx + 0x10]
mov esi, ebx
mov dword [ebp - 0x30], 0
mov edx, dword [ebp - 0x28]
mov ecx, dword [ebp - 0x2c]
push 0
push dword [0x5cdd8c]
mov esi, dword [esi]
push eax
mov eax, dword [ebp - 0x4c]
or esi, 0x10000
push dword [eax + 4]
mov eax, dword [ebp - 0x20]
sub eax, edx
push eax
mov eax, dword [ebp - 0x24]
sub eax, ecx
push eax
push edx
push ecx
push esi
push 0
push 0x598d04
push dword [ebp - 0x30]
call main
mov esi, eax
mov dword [ebp - 0x30], esi
test esi, esi
je 0x50177a
mov eax, 0xffff
cmp word [ebp - 0x40], ax
jne 0x5016a1
mov eax, dword [ebx]
test eax, eax
je 0x5016a1
push eax
push esi
call dword [sym.imp.USER32.dll_SetWindowContextHelpId]
mov ebx, dword [ebp - 0x14]
mov dword [ebp - 0x5c], ebx
mov dword [ebp - 0x18], 0
lea eax, [ebp - 0x18]
mov byte [ebp - 4], 2
push eax
push 0x59853c
lea ecx, [ebp - 0x30]
call main
test eax, eax
jns 0x5016e2
push edi
push 0
push 0x570840
push 0
push 0
push ebx
push esi
push dword [ebp - 0x38]
call main
mov dword [ebp - 0x30], eax
jmp 0x501731
mov dword [ebp - 0x1c], 0
mov eax, dword [ebp - 0x18]
lea ecx, [ebp - 0x1c]
push edi
push 0
push 0x570840
mov ebx, dword [eax]
push ecx
push dword [ebp - 0x5c]
mov byte [ebp - 4], 3
mov ebx, dword [ebx + 0x28]
mov ecx, ebx
push esi
push dword [ebp - 0x38]
push eax
call dword [0x5677a4]
call ebx
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x1c]
mov byte [ebp - 4], 2
test eax, eax
je 0x501731
mov ecx, dword [eax]
push eax
mov ebx, dword [ecx + 8]
mov ecx, ebx
call dword [0x5677a4]
call ebx
mov eax, dword [ebp - 0x18]
mov byte [ebp - 4], 1
test eax, eax
je 0x50174c
mov ecx, dword [eax]
push eax
mov ebx, dword [ecx + 8]
mov ecx, ebx
call dword [0x5677a4]
call ebx
cmp dword [ebp - 0x30], 0
jl 0x501838
push 0x13
push 0
push 0
xor eax, eax
cmp word [ebp - 0x3c], ax
push 0
cmovne eax, dword [ebp - 0x34]
push 0
push eax
push esi
call dword [sym.imp.USER32.dll_SetWindowPos]
mov ebx, dword [ebp - 0x50]
mov dword [ebp - 0x34], esi
jmp 0x501782
call fcn.004791b0
mov dword [ebp - 0x30], eax
push edi
mov byte [ebp - 4], 0
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x5017ab
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x5677a4]
call esi
mov edi, dword [ebp - 0x34]
push dword [ebp - 0x60]
push ebx
call main
mov ecx, dword [ebp - 0x3c]
add esp, 8
inc ecx
mov ebx, eax
mov dword [ebp - 0x50], ebx
mov dword [ebp - 0x3c], ecx
cmp cx, word [ebp - 0x54]
jae 0x501833
mov esi, dword [ebp - 0x40]
jmp 0x501490
test cx, cx
je 0x5017ae
push 2
push edi
call dword [sym.imp.USER32.dll_GetWindow]
mov edi, eax
mov dword [ebp - 0x34], edi
jmp 0x5017ae
lea ecx, [ebp - 0x14]
call main
mov eax, dword [ebp - 0x30]
jmp 0x501860
call fcn.004791b0
mov dword [ebp - 0x30], eax
mov eax, dword [ebp - 0x14]
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x501833
jmp 0x501823
mov eax, dword [ebp - 0x14]
mov dword [ebp - 0x30], 0x8007000e
mov dword [ebp - 4], 0xffffffff
test eax, eax
je 0x501857
mov ecx, dword [eax]
push eax
mov esi, dword [ecx + 8]
mov ecx, esi
call dword [0x5677a4]
call esi
mov eax, dword [ebp - 0x30]
jmp 0x501860
push edi
mov byte [ebp - 4], 0
call dword [sym.imp.OLEAUT32.dll_SysStringLen]
lea ecx, [ebp - 0x14]
call main
mov eax, dword [ebp - 0x30]
jmp 0x501860
call fcn.004791b0
jmp 0x501860
mov eax, 0x8007000e
jmp 0x501860
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov ecx, dword [ebp - 0x10]
xor ecx, ebp
call fcn.0040154f
mov esp, ebp
pop ebp
ret 4