Function at 0x40a200
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x4930f0
mov eax, dword fs:[0]
push eax
push ecx
push ebx
push esi
push edi
mov eax, dword [0x4c51d0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
mov eax, dword [ebp + 8]
test eax, eax
je 0x40a3f5
cmp dword [ebp + 0xc], 0
je 0x40a3f5
push eax
lea ecx, [ebp + 8]
call fcn.00401c40
lea edi, [ebp + 8]
mov dword [ebp - 4], 0
call fcn.0040ce60
call fcn.00404ef0
mov eax, dword [ebp + 8]
push 0x2e
push eax
call fcn.0046ec1e
add esp, 8
test eax, eax
jne 0x40a26f
or eax, 0xffffffff
jmp 0x40a274
sub eax, dword [ebp + 8]
sar eax, 1
lea ecx, [eax + 1]
lea esi, [ebp - 0x10]
lea edx, [ebp + 8]
call fcn.004013e0
mov byte [ebp - 4], 1
mov ebx, dword [ebp + 8]
call fcn.00409ba0
mov edi, eax
lea edx, [eax + 1]
mov cl, byte [eax]
inc eax
test cl, cl
jne 0x40a293
sub eax, edx
mov esi, eax
call fcn.00409c80
mov esi, eax
push esi
lea ecx, [ebp + 8]
push str.id__s
push ecx
call fcn.0040d860
add esp, 0xc
test edi, edi
je 0x40a2c4
push edi
call fcn.0046fcb1
add esp, 4
test esi, esi
je 0x40a2d1
push esi
call fcn.0046fcb1
add esp, 4
push 0
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
mov ebx, dword [ebp - 0x10]
mov edx, dword [ebp + 8]
push ebx
mov esi, eax
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov edi, eax
test edi, edi
je 0x40a3af
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push esi
mov dword [ebp - 0x10], eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
push edi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
test esi, esi
je 0x40a3af
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov ecx, dword [ebp - 0x10]
push edi
push ecx
push eax
call fcn.00473280
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov edx, dword [ebp + 0xc]
push edx
push 1
push esi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
xor ecx, ecx
test eax, eax
setns cl
lea eax, [ebx - 0x10]
mov byte [ebp - 4], 0
lea edx, [eax + 0xc]
mov esi, ecx
or ecx, 0xffffffff
lock xadd dword [edx], ecx
dec ecx
test ecx, ecx
jg 0x40a375
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a39b
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov eax, esi
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret
lea eax, [ebx - 0x10]
or edx, 0xffffffff
lea ecx, [eax + 0xc]
mov byte [ebp - 4], 0
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a3cf
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 8]
add eax, 0xfffffff0
or edx, 0xffffffff
lea ecx, [eax + 0xc]
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x40a3f5
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call eax
xor eax, eax
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret