Function at 0x515a90
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
add esp, 0xffffffd8
push ebx
push esi
push edi
xor ebx, ebx
mov dword [ebp - 0x10], ebx
mov dword [ebp - 0x14], ebx
mov dword [ebp - 0xc], ebx
mov esi, ecx
mov dword [ebp - 8], edx
mov dword [ebp - 4], eax
mov eax, dword [ebp - 4]
call fcn.004070ac
mov eax, dword [ebp - 8]
call fcn.004070ac
xor eax, eax
push ebp
push 0x515d53
push dword fs:[eax]
mov dword fs:[eax], esp
mov byte [ebp - 0x15], 0
mov eax, dword [ebp - 4]
call fcn.00407150
push eax
call sub.kernel32.dll_LoadLibraryW
mov ebx, eax
test ebx, ebx
je 0x515d25
mov eax, esi
test eax, eax
jns 0x515aef
add eax, 0xf
sar eax, 4
inc eax
mov dword [ebp - 0x1c], eax
and esi, 0x8000000f
jns 0x515b03
dec esi
or esi, 0xfffffff0
inc esi
mov dword [ebp - 0x20], esi
push 6
mov eax, dword [ebp - 0x1c]
push eax
push ebx
call sub.kernel32.dll_FindResourceW
mov esi, eax
test esi, esi
je 0x515b54
push esi
push ebx
call sub.kernel32.dll_SizeofResource
mov dword [ebp - 0x24], eax
mov eax, dword [ebp - 0x24]
push eax
lea eax, [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x40adb4]
call fcn.00408b9c
add esp, 4
push esi
push ebx
call sub.kernel32.dll_LoadResource
push eax
call sub.kernel32.dll_LockResource
mov ecx, dword [ebp - 0x24]
mov edx, dword [ebp - 0x10]
call fcn.00404478
push ebx
call sub.kernel32.dll_FreeLibrary_1
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 8]
call fcn.00407118
mov eax, dword [ebp - 0xc]
test eax, eax
je 0x515b82
mov edx, eax
sub edx, 0xa
cmp word [edx], 2
je 0x515b82
lea eax, [ebp - 0xc]
mov edx, dword [ebp - 0xc]
call fcn.00406844
test eax, eax
je 0x515b8b
sub eax, 4
mov eax, dword [eax]
mov dword [ebp - 0x24], eax
xor eax, eax
mov dword [ebp - 0x28], eax
mov ebx, dword [ebp - 0x20]
test ebx, ebx
jl 0x515be6
inc ebx
xor esi, esi
mov eax, dword [ebp - 0x10]
call fcn.004089dc
cmp eax, dword [ebp - 0x28]
jge 0x515bc7
mov eax, dword [ebp - 0x28]
add eax, 2
push eax
lea eax, [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x40adb4]
call fcn.00408b9c
add esp, 4
cmp esi, dword [ebp - 0x20]
je 0x515be2
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x10]
call fcn.00515a30
movzx eax, ax
inc eax
mov edi, eax
add edi, edi
add dword [ebp - 0x28], edi
inc esi
dec ebx
jne 0x515b9d
mov edx, dword [ebp - 0x28]
mov eax, dword [ebp - 0x10]
call fcn.00515a30
movzx eax, ax
inc eax
mov edi, eax
add edi, edi
mov eax, dword [ebp - 0x10]
call fcn.004089d4
sub eax, edi
push eax
lea eax, [ebp - 0x14]
push eax
mov ecx, dword [ebp - 0x28]
add ecx, edi
mov edx, dword [0x40adb4]
mov eax, dword [ebp - 0x10]
call fcn.00408bc8
mov eax, dword [ebp - 0x28]
push eax
lea eax, [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x40adb4]
call fcn.00408b9c
add esp, 4
mov eax, dword [ebp - 0x14]
call fcn.004089d4
mov edx, dword [ebp - 0x24]
inc edx
add edx, edx
add edx, dword [ebp - 0x28]
add eax, edx
push eax
lea eax, [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x40adb4]
call fcn.00408b9c
add esp, 4
lea ecx, [ebp - 0x28]
movzx edx, word [ebp - 0x24]
mov eax, dword [ebp - 0x10]
call fcn.005159c4
mov ebx, dword [ebp - 0x24]
test ebx, ebx
jle 0x515c91
mov esi, 1
lea ecx, [ebp - 0x28]
mov eax, dword [ebp - 0xc]
movzx edx, word [eax + esi*2 - 2]
mov eax, dword [ebp - 0x10]
call fcn.005159c4
inc esi
dec ebx
jne 0x515c7a
mov eax, dword [ebp - 0x14]
call fcn.004089dc
mov ebx, eax
test ebx, ebx
jl 0x515cb8
inc ebx
xor esi, esi
mov eax, dword [ebp - 0x28]
add eax, esi
mov edx, dword [ebp - 0x10]
mov ecx, dword [ebp - 0x14]
movzx ecx, byte [ecx + esi]
mov byte [edx + eax], cl
inc esi
dec ebx
jne 0x515ca2
push 0
lea eax, [ebp - 0x14]
mov ecx, 1
mov edx, dword [0x40adb4]
call fcn.00408b9c
add esp, 4
push 0
mov eax, dword [ebp - 4]
call fcn.00407150
push eax
call sub.kernel32.dll_BeginUpdateResourceW
mov ebx, eax
test ebx, ebx
je 0x515d25
mov eax, dword [ebp - 0x10]
call fcn.004089d4
push eax
mov eax, dword [ebp - 0x10]
push eax
push 0
mov eax, dword [ebp - 0x1c]
push eax
push 6
push ebx
call sub.kernel32.dll_UpdateResourceW
push 0
push ebx
call sub.kernel32.dll_EndUpdateResourceW
push 0
lea eax, [ebp - 0x10]
mov ecx, 1
mov edx, dword [0x40adb4]
call fcn.00408b9c
add esp, 4
mov byte [ebp - 0x15], 1
xor eax, eax
pop edx
pop ecx
pop ecx
mov dword fs:[eax], edx
push 0x515d5a
lea eax, [ebp - 0x14]
mov edx, dword [0x40adb4]
mov ecx, 2
call fcn.00407f38
lea eax, [ebp - 0xc]
mov edx, 3
call fcn.004070bc
ret