Function at 0x4012f5
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
sub esp, 0x14
push edi
push 0xc
call fcn.00408e20
pop ecx
push 3
push 0
push dword [ebp + 8]
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
push 0x409
push dword [ebp + 0xc]
mov dword [ebp - 0x10], eax
push 0xe
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceExA]
test eax, eax
je 0x401711
push ebx
push esi
push eax
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov esi, eax
movzx ax, byte [esi]
push 2
pop ebx
mov word [edi], ax
add esi, ebx
movzx ax, byte [esi]
mov word [edi + 2], ax
add esi, ebx
movzx ax, byte [esi]
mov word [edi + 4], ax
movzx eax, ax
xor ecx, ecx
push 0x10
pop edx
add esi, ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00408e5a
pop ecx
mov dword [edi + 8], eax
xor eax, eax
xor ecx, ecx
mov dword [ebp - 4], eax
cmp cx, word [edi + 4]
jae 0x4013fe
mov dl, byte [esi]
mov ecx, dword [edi + 8]
mov byte [eax + ecx], dl
mov ecx, dword [edi + 8]
inc esi
mov dl, byte [esi]
mov byte [eax + ecx + 1], dl
mov ecx, dword [edi + 8]
inc esi
mov dl, byte [esi]
mov byte [eax + ecx + 2], dl
mov ecx, dword [edi + 8]
inc esi
mov dl, byte [esi]
mov byte [eax + ecx + 3], dl
mov edx, dword [edi + 8]
inc esi
movzx cx, byte [esi]
mov word [eax + edx + 4], cx
mov edx, dword [edi + 8]
add esi, ebx
movzx cx, byte [esi]
mov word [eax + edx + 6], cx
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx + 8]
mov ecx, dword [eax + ecx + 8]
mov edx, dword [edi + 8]
mov dword [eax + edx + 8], ecx
mov edx, dword [edi + 8]
add esi, 6
movzx cx, byte [esi]
mov word [eax + edx + 0xc], cx
movzx ecx, word [edi + 4]
add esi, ebx
inc dword [ebp - 4]
add eax, 0x10
cmp dword [ebp - 4], ecx
jl 0x40138c
push 0xc
call fcn.00408e20
mov esi, eax
mov eax, dword [ebp + 0x10]
mov cx, word [eax]
mov word [esi], cx
mov cx, word [eax + 2]
mov word [esi + 2], cx
movzx eax, word [eax + 4]
mov word [esi + 4], ax
shl eax, 4
add eax, 6
movzx eax, ax
push eax
mov dword [ebp - 0xc], eax
call fcn.00408e5a
mov ebx, eax
mov ax, word [esi]
mov word [ebx], ax
mov ax, word [esi + 2]
mov dword [ebp - 0x14], ebx
inc ebx
inc ebx
mov word [ebx], ax
mov ax, word [esi + 4]
inc ebx
inc ebx
mov word [ebx], ax
movzx eax, word [esi + 4]
xor ecx, ecx
push 0x10
inc ebx
pop edx
inc ebx
mul edx
seto cl
neg ecx
or ecx, eax
push ecx
call fcn.00408e5a
mov dword [esi + 8], eax
xor eax, eax
xor ecx, ecx
add esp, 0xc
mov dword [ebp - 4], eax
cmp cx, word [esi + 4]
jae 0x401597
mov edx, dword [esi + 8]
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx + 8]
mov cl, byte [eax + ecx]
mov byte [eax + edx], cl
mov ecx, dword [esi + 8]
mov cl, byte [eax + ecx]
mov byte [ebx], cl
mov edx, dword [esi + 8]
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx + 8]
mov cl, byte [eax + ecx + 1]
mov byte [eax + edx + 1], cl
mov ecx, dword [esi + 8]
mov cl, byte [eax + ecx + 1]
inc ebx
mov byte [ebx], cl
mov edx, dword [esi + 8]
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx + 8]
mov cl, byte [eax + ecx + 2]
mov byte [eax + edx + 2], cl
mov ecx, dword [esi + 8]
mov cl, byte [eax + ecx + 2]
inc ebx
mov byte [ebx], cl
mov edx, dword [esi + 8]
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx + 8]
mov cl, byte [eax + ecx + 3]
mov byte [eax + edx + 3], cl
mov ecx, dword [esi + 8]
mov cl, byte [eax + ecx + 3]
inc ebx
mov byte [ebx], cl
mov edx, dword [esi + 8]
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx + 8]
mov cx, word [eax + ecx + 4]
mov word [eax + edx + 4], cx
mov ecx, dword [esi + 8]
mov cx, word [eax + ecx + 4]
inc ebx
mov word [ebx], cx
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx + 8]
mov cx, word [eax + ecx + 6]
mov edx, dword [esi + 8]
mov word [eax + edx + 6], cx
mov ecx, dword [esi + 8]
mov cx, word [eax + ecx + 6]
inc ebx
inc ebx
mov word [ebx], cx
mov ecx, dword [ebp + 0x10]
mov ecx, dword [ecx + 8]
mov ecx, dword [eax + ecx + 8]
mov edx, dword [esi + 8]
mov dword [eax + edx + 8], ecx
mov ecx, dword [esi + 8]
mov ecx, dword [eax + ecx + 8]
inc ebx
inc ebx
mov dword [ebx], ecx
movzx ecx, word [edi + 4]
add ebx, 4
cmp dword [ebp - 4], ecx
jge 0x401561
mov ecx, dword [edi + 8]
mov edx, dword [esi + 8]
mov cx, word [eax + ecx + 0xc]
mov word [eax + edx + 0xc], cx
jmp 0x401577
inc word [0x610b1c]
mov ecx, dword [esi + 8]
mov dx, word [0x610b1c]
mov word [eax + ecx + 0xc], dx
mov ecx, dword [esi + 8]
mov cx, word [eax + ecx + 0xc]
mov word [ebx], cx
movzx ecx, word [esi + 4]
inc ebx
inc ebx
inc dword [ebp - 4]
add eax, 0x10
cmp dword [ebp - 4], ecx
jl 0x401480
push dword [ebp - 0x10]
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
push 0x80
push dword [ebp + 8]
call fcn.00555563
pop ecx
pop ecx
push 0
push dword [ebp + 8]
call dword [sym.imp.KERNEL32.dll_BeginUpdateResourceA]
mov dword [ebp - 8], eax
test eax, eax
jne 0x4015d6
push eax
push dword [ebp + 8]
push str.eroare_BeginUpdateResource
push dword [0x610b24]
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [ebp - 0xc]
mov ebx, dword [sym.imp.KERNEL32.dll_UpdateResourceA]
push dword [ebp - 0x14]
push 0x409
push dword [ebp + 0xc]
push 0xe
push dword [ebp - 8]
call ebx
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x40160d
push eax
push dword [ebp + 8]
push str.eroare_UpdateResource_RT_GROUP_ICON
push dword [0x610b24]
call dword [sym.imp.USER32.dll_MessageBoxA]
and dword [ebp - 4], 0
xor eax, eax
cmp ax, word [esi + 4]
jae 0x40166d
and dword [ebp - 0xc], eax
mov eax, dword [esi + 8]
mov ecx, dword [ebp - 0xc]
mov edx, dword [ebp - 4]
add eax, ecx
push dword [eax + 8]
mov ecx, dword [ebp + 0x14]
push dword [ecx + edx*4]
movzx eax, word [eax + 0xc]
push 0x409
push eax
push 3
push dword [ebp - 8]
call ebx
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x40165d
push eax
push dword [ebp + 8]
push str.eroare_UpdateResource_RT_ICON
push dword [0x610b24]
call dword [sym.imp.USER32.dll_MessageBoxA]
movzx eax, word [esi + 4]
inc dword [ebp - 4]
add dword [ebp - 0xc], 0x10
cmp dword [ebp - 4], eax
jl 0x40161c
movzx eax, word [esi + 4]
movzx ecx, word [edi + 4]
cmp eax, ecx
mov dword [ebp - 4], eax
jge 0x4016cf
shl eax, 4
mov dword [ebp - 0xc], eax
jmp 0x401687
mov eax, dword [ebp - 0xc]
mov ecx, dword [edi + 8]
movzx eax, word [ecx + eax + 0xc]
push 0
push 0x5d2720
push 0x409
push eax
push 3
push dword [ebp - 8]
call ebx
mov dword [ebp - 0x10], eax
test eax, eax
jne 0x4016bf
push eax
push dword [ebp + 8]
push str.eroare_stergere_resurse_vechi
push dword [0x610b24]
call dword [sym.imp.USER32.dll_MessageBoxA]
movzx eax, word [edi + 4]
inc dword [ebp - 4]
add dword [ebp - 0xc], 0x10
cmp dword [ebp - 4], eax
jl 0x401684
push 0
push dword [ebp - 8]
call dword [sym.imp.KERNEL32.dll_EndUpdateResourceA]
test eax, eax
jne 0x4016f3
push eax
push dword [ebp + 8]
push str.eroare_EndUpdateResource
push dword [0x610b24]
call dword [sym.imp.USER32.dll_MessageBoxA]
push dword [esi + 8]
call fcn.00408e65
push esi
call fcn.00408e4f
push dword [ebp - 0x14]
call fcn.00408e65
mov eax, dword [ebp - 0x10]
add esp, 0xc
pop esi
pop ebx
pop edi
leave
ret