Function at 0x40cd00
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x42f4f6
mov eax, dword fs:[0]
push eax
sub esp, 0x240
mov eax, dword [0x44206c]
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, edx
mov dword [ebp - 0x21c], edi
mov esi, ecx
mov dword [ebp - 0x230], esi
mov dword [ebp - 0x22c], esi
call fcn.004019c0
mov ecx, eax
test edi, edi
jne 0x40cd8b
test ecx, ecx
je 0x40cfad
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [esi], eax
push str._none_
mov ecx, esi
mov dword [ebp - 4], edi
call fcn.00408eb0
test al, al
jne 0x40cf8f
push 6
push str._none_
mov ecx, esi
call fcn.00409200
jmp 0x40cf8f
test ecx, ecx
je 0x40cfb7
mov eax, dword [ecx]
call dword [eax + 0xc]
add eax, 0x10
mov dword [ebp - 0x228], eax
push 0x104
lea eax, [ebp - 0x218]
mov dword [ebp - 4], 1
push eax
push edi
call dword [sym.imp.KERNEL32.dll_GetModuleFileNameW]
test eax, eax
je 0x40cdf1
lea eax, [ebp - 0x218]
push eax
call dword [sym.imp.SHLWAPI.dll_PathFindFileNameW]
mov edx, eax
test edx, edx
jne 0x40cdd6
xor ecx, ecx
jmp 0x40cdfb
mov ecx, edx
lea ebx, [ecx + 2]
jmp 0x40cde0
mov ax, word [ecx]
add ecx, 2
test ax, ax
jne 0x40cde0
sub ecx, ebx
sar ecx, 1
jmp 0x40cdfb
mov edx, 0x43dab0
mov ecx, 3
push ecx
push edx
lea ecx, [ebp - 0x228]
call fcn.00408200
push 0x10
push 1
push edi
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x220], 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebx, eax
test ebx, ebx
je 0x40cf2c
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov edi, eax
test edi, edi
je 0x40cf2c
push ebx
push dword [ebp - 0x21c]
call dword [sym.imp.KERNEL32.dll_SizeofResource]
sub esp, 0xc
mov dword [ebp - 0x22c], 0
mov ebx, eax
xor edx, edx
mov dword [ebp - 0x230], ebx
call fcn.0040a6f0
add esp, 0xc
test eax, eax
jne 0x40ceca
push 0x1c
lea eax, [ebp - 0x24c]
push eax
push edi
call dword [sym.imp.KERNEL32.dll_VirtualQuery]
test eax, eax
je 0x40cf16
mov eax, dword [ebp - 0x238]
cmp eax, 2
jne 0x40ce9d
mov eax, 4
jmp 0x40ceac
cmp eax, 0x10
je 0x40cea7
cmp eax, 0x20
jne 0x40ceca
mov eax, 0x40
lea ecx, [ebp - 0x21c]
push ecx
push eax
push ebx
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test eax, eax
je 0x40cf16
mov dword [ebp - 0x22c], 1
lea eax, [ebp - 0x220]
push eax
lea eax, [ebp - 0x224]
push eax
push 0x43d694
push edi
call dword [sym.imp.VERSION.dll_VerQueryValueW]
cmp dword [ebp - 0x22c], 0
mov ebx, eax
je 0x40cf09
lea eax, [ebp - 0x21c]
push eax
push dword [ebp - 0x21c]
push dword [ebp - 0x230]
push edi
call dword [sym.imp.KERNEL32.dll_VirtualProtect]
test ebx, ebx
je 0x40cf16
cmp dword [ebp - 0x220], 0
jne 0x40cf2c
mov dword [ebp - 0x224], 0
mov dword [ebp - 0x220], 0
jmp 0x40cf5e
mov ecx, dword [ebp - 0x224]
test ecx, ecx
je 0x40cf5e
movzx eax, word [ecx + 0xc]
push eax
movzx eax, word [ecx + 0xe]
push eax
movzx eax, word [ecx + 8]
push eax
movzx eax, word [ecx + 0xa]
push eax
lea eax, [ebp - 0x228]
push str.__hu._hu._hu._hu
push eax
call fcn.0040c330
add esp, 0x18
mov edi, dword [ebp - 0x228]
add edi, 0xfffffff0
mov ecx, edi
call fcn.00408cc0
add eax, 0x10
mov dword [ebp - 4], 0xffffffff
mov dword [esi], eax
or eax, 0xffffffff
lock xadd dword [edi + 0xc], eax
dec eax
test eax, eax
jg 0x40cf8f
mov ecx, dword [edi]
push edi
mov eax, dword [ecx]
call dword [eax + 4]
mov eax, esi
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.004146e0
mov esp, ebp
pop ebp
ret
push 0x80004005
call fcn.004093b0
push 0x80004005
call fcn.004093b0
int3