Function at 0x401870
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push ebp
mov ebp, esp
push 0xffffffffffffffff
push 0x536c48
mov eax, dword fs:[0]
push eax
sub esp, 0x20
push ebx
push esi
push edi
mov eax, dword [0x587be0]
xor eax, ebp
push eax
lea eax, [ebp - 0xc]
mov dword fs:[0], eax
movzx ecx, word [ebp + 0xc]
mov dword [ebp - 4], 0
mov eax, dword [ebp + 0x10]
mov edx, dword [0x58f9d8]
push eax
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov esi, eax
mov eax, dword [0x58f9d8]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov ecx, dword [0x58f9d8]
push esi
push ecx
mov ebx, eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
push ebx
push 2
mov dword [ebp - 0x18], eax
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov edx, dword [ebp - 0x18]
push edx
mov edi, eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
mov dword [ebp - 0x1c], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov dword [ebp - 0x14], 0
test esi, esi
je 0x401a18
cmp dword [ebp - 0x18], 0
je 0x401a18
test eax, eax
je 0x401a18
mov ecx, dword [ebp - 0x1c]
push ebx
push ecx
push eax
call fcn.00515870
add esp, 0xc
push edi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
lea edx, [ebp - 0x14]
push edx
push 1
push edi
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
mov ecx, dword [ebp - 0x14]
lea eax, [ebp - 0x28]
push eax
mov esi, vtable.Gdiplus::Image.0
push ecx
mov dword [ebp - 0x2c], esi
mov dword [ebp - 0x28], 0
call dword [sym.imp.gdiplus.dll_GdipLoadImageFromStream]
mov dword [ebp - 0x24], eax
mov byte [ebp - 4], 2
mov edx, dword [ebp - 0x2c]
mov eax, dword [edx + 4]
lea ecx, [ebp - 0x2c]
call eax
mov ebx, dword [ebp + 8]
mov byte [ebp - 4], 0
mov ecx, dword [ebp - 0x28]
push ecx
mov dword [ebx], eax
mov dword [ebp - 0x2c], esi
call dword [sym.imp.gdiplus.dll_GdipDisposeImage]
push 0x1c
call fcn.00413966
add esp, 4
test eax, eax
je 0x401997
mov esi, eax
call fcn.00401a70
mov esi, eax
jmp 0x401999
xor esi, esi
mov edx, dword [ebx]
movzx ecx, word [0x58f9dc]
mov eax, dword [ebp + 0xc]
mov dword [esi], edx
lea edx, [ebp + 0x10]
mov dword [esi + 8], ecx
lea ecx, [esi + 0xc]
push edx
mov dword [esi + 4], eax
call fcn.00402580
mov eax, dword [0x58f9e0]
mov ecx, dword [eax + 0x18]
mov dword [esi + 0x18], ecx
mov dword [eax + 0x18], esi
mov eax, dword [ebp - 0x14]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
push edi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov dword [ebp - 4], 0xffffffff
mov eax, dword [ebp + 0x10]
add eax, 0xfffffff0
mov dword [ebp - 0x14], 0
lea ecx, [eax + 0xc]
or edx, 0xffffffff
lock xadd dword [ecx], edx
dec edx
test edx, edx
jg 0x401a06
mov ecx, dword [eax]
mov edx, dword [ecx]
push eax
mov eax, dword [edx + 4]
call 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
call fcn.004145bf
xor ecx, ecx
test eax, eax
setne cl
test ecx, ecx
jne 0x401a32
push 0x80004005
call fcn.00402b70
mov edx, dword [eax]
mov ecx, eax
mov eax, dword [edx + 0xc]
call eax
add eax, 0x10
mov dword [ebp - 0x18], eax
mov ecx, dword [ebp + 0xc]
push ecx
lea edx, [ebp - 0x18]
push str.Image_Resource_Error:_d
push edx
mov byte [ebp - 4], 1
call fcn.00402180
mov eax, dword [ebp - 0x18]
add esp, 0xc
push 0
push 0
push eax
call fcn.00414c60
push 1
call fcn.0051230d
int3