Function at 0x402090
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
and esp, 0xfffffff8
push 0xffffffffffffffff
push 0x4128e8
mov eax, dword fs:[0]
push eax
sub esp, 0x10
push ebx
push esi
push edi
mov eax, dword [0x418028]
xor eax, esp
push eax
lea eax, [esp + 0x20]
mov dword fs:[0], eax
mov ebx, ecx
mov esi, str.LoadModuleResource
mov dword [esp + 0x14], vtable.TraceHelper.0
mov dword [esp + 0x18], esi
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov edi, eax
mov eax, dword [0x419058]
cmp eax, 0x419058
je 0x402100
test byte [eax + 0x1c], 8
je 0x402100
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
push 0x414d50
push 0xa
push ecx
push edx
call fcn.00401c60
add esp, 0x10
push edi
call dword [sym.imp.KERNEL32.dll_SetLastError]
movzx eax, word [ebp + 8]
push str.CERTIFICATE
push eax
push ebx
mov dword [esp + 0x34], 0
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
test esi, esi
jne 0x402189
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x40213a
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
test edi, edi
jge 0x402157
mov eax, dword [0x419058]
cmp eax, 0x419058
je 0x402181
test byte [eax + 0x1c], 2
je 0x402181
push edi
push 0xd
jmp 0x40216c
mov eax, dword [0x419058]
cmp eax, 0x419058
je 0x402181
test byte [eax + 0x1c], 4
je 0x402181
push edi
push 0xe
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
push ecx
push edx
mov edx, str.FindResource_FAILED.
call fcn.00401be0
add esp, 0x10
test edi, edi
jl 0x40224e
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [ebp + 0x10]
mov dword [ecx], eax
test eax, eax
jne 0x4021c4
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4021ae
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
mov ecx, edi
mov edx, str.SizeofResource_FAILED.
call fcn.00401d80
test edi, edi
jl 0x40224e
push esi
push ebx
call dword [sym.imp.KERNEL32.dll_LoadResource]
mov ebx, eax
test ebx, ebx
jne 0x4021f8
call dword [sym.imp.KERNEL32.dll_GetLastError]
test eax, eax
jle 0x4021e6
and eax, 0xffff
or eax, 0x80070000
mov edi, eax
mov ecx, edi
mov edx, str.LoadResource_FAILED.
call fcn.00401d80
test edi, edi
jl 0x402243
mov edx, dword [ebp + 0x10]
mov eax, dword [edx]
push eax
call fcn.004088c5
mov ecx, dword [ebp + 0xc]
mov edi, eax
add esp, 4
mov dword [ecx], edi
test edi, edi
jne 0x402224
mov edi, 0x8007000e
mov ecx, edi
mov edx, str.Dispatch_memory_failed.
call fcn.00401d80
jmp 0x402243
mov edx, dword [ebp + 0x10]
mov esi, dword [edx]
push esi
push 0
push edi
call fcn.0040a700
add esp, 0xc
push esi
push ebx
push esi
push edi
call fcn.00408848
add esp, 0x10
xor edi, edi
test ebx, ebx
je 0x40224e
push ebx
call dword [sym.imp.KERNEL32.dll_FreeResource]
call dword [sym.imp.KERNEL32.dll_GetLastError]
mov ebx, eax
mov eax, dword [0x419058]
cmp eax, 0x419058
je 0x402284
test byte [eax + 0x1c], 8
je 0x402284
mov ecx, dword [eax + 0x14]
mov edx, dword [eax + 0x10]
push 0x414d50
push 0xb
push ecx
push edx
mov esi, str.LoadModuleResource
call fcn.00401c60
add esp, 0x10
push ebx
call dword [sym.imp.KERNEL32.dll_SetLastError]
mov eax, edi
mov ecx, dword [esp + 0x20]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
mov esp, ebp
pop ebp
ret