Function at 0x10004050
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x1001a206
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x420
mov eax, dword [0x100204fc]
push ebx
push esi
push edi
mov dword [ebp - 0x14], eax
mov dword [ebp - 0x10], esp
mov esi, ecx
call dword [0x100200c8]
xor ebx, ebx
mov dword [ebp - 0x41c], eax
mov dword [ebp - 0x420], ebx
mov dword [ebp - 4], ebx
mov dword [ebp - 0x428], esi
mov dword [ebp - 0x42c], ebx
mov dword [ebp - 0x418], ebx
mov eax, dword [ebp + 8]
cmp eax, ebx
mov byte [ebp - 4], 1
je 0x10004131
push eax
call dword [sym.imp.KERNEL32.dll_lstrlenW]
lea edi, [eax + eax + 2]
cmp edi, 0x400
jg 0x100040e6
push edi
call fcn.10003880
add esp, 4
test al, al
je 0x100040e6
mov eax, edi
add eax, 3
and eax, 0xfffffffc
call fcn.10012320
mov dword [ebp - 0x10], esp
mov esi, esp
jmp 0x10004107
lea eax, [edi + 8]
push eax
call fcn.10012724
add esp, 4
test eax, eax
je 0x10004131
mov ebx, eax
mov dword [eax], 0
mov dword [ebp - 0x420], ebx
lea esi, [eax + 8]
test esi, esi
je 0x10004131
mov ecx, dword [ebp + 8]
mov edx, dword [ebp - 0x41c]
push 0
push 0
push edi
push esi
push 0xffffffffffffffff
push ecx
push 0
push edx
mov byte [esi], 0
call dword [sym.imp.KERNEL32.dll_WideCharToMultiByte]
neg eax
sbb eax, eax
and eax, esi
jmp 0x10004133
xor eax, eax
test eax, eax
jne 0x10004171
mov ecx, dword [ebp - 0x418]
lea eax, [ebp - 0x414]
cmp ecx, eax
je 0x10004152
lea ecx, [ebp - 0x418]
call fcn.10005900
test ebx, ebx
je 0x10004167
mov eax, ebx
mov ebx, dword [ebx]
push eax
call fcn.10011b5e
add esp, 4
test ebx, ebx
jne 0x10004156
mov eax, 0x8007000e
jmp 0x100042b3
push 2
push 0
push eax
call dword [sym.imp.KERNEL32.dll_LoadLibraryExA]
mov esi, eax
test esi, esi
mov dword [ebp - 0x41c], esi
jne 0x10004194
call fcn.10003910
mov edi, eax
jmp 0x1000427d
mov ecx, dword [ebp + 0x10]
mov edx, dword [ebp + 0xc]
push ecx
push edx
push esi
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov edi, eax
test edi, edi
jne 0x100041b3
call fcn.10003910
jmp 0x10004274
push edi
push esi
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [ebp - 0x424], eax
jne 0x100041cf
call fcn.10003910
jmp 0x10004274
push edi
push esi
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
lea eax, [edi + 1]
cmp eax, 0x400
mov dword [ebp + 8], edi
mov byte [ebp - 4], 2
jbe 0x100041fe
push eax
lea ecx, [ebp - 0x418]
call fcn.10005910
jmp 0x1000421b
lea eax, [ebp - 0x414]
mov dword [ebp - 0x418], eax
jmp 0x1000421b
mov eax, dword [ebp - 0x418]
test eax, eax
mov dword [ebp - 4], 1
jne 0x10004233
mov edi, 0x8007000e
jmp 0x10004276
mov esi, dword [ebp - 0x424]
mov ecx, edi
mov edx, ecx
shr ecx, 2
mov edi, eax
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
mov edx, dword [ebp + 0x14]
and ecx, 3
rep movsb byte es:[edi], byte [esi]
mov eax, dword [ebp - 0x418]
mov ecx, dword [ebp + 8]
mov byte [ecx + eax], 0
mov eax, dword [ebp - 0x418]
push edx
push eax
lea ecx, [ebp - 0x42c]
call fcn.100042f0
mov esi, dword [ebp - 0x41c]
mov edi, eax
push esi
call dword [sym.imp.KERNEL32.dll_FreeLibrary]
mov eax, dword [ebp - 0x418]
lea ecx, [ebp - 0x414]
cmp eax, ecx
je 0x10004298
lea ecx, [ebp - 0x418]
call fcn.10005900
test ebx, ebx
je 0x100042b1
lea esp, [esp]
mov eax, ebx
mov ebx, dword [ebx]
push eax
call fcn.10011b5e
add esp, 4
test ebx, ebx
jne 0x100042a0
mov eax, edi
lea esp, [ebp - 0x438]
mov ecx, dword [ebp - 0xc]
mov dword fs:[0], ecx
mov ecx, dword [ebp - 0x14]
call fcn.10012240
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret 0x10