Function at 0x40a470
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0xffffffffffffffff
push 0x592c98
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x61e69c]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
xor ebx, ebx
cmp byte [0x66025c], bl
jne 0x40a4d3
lea eax, [esp + 0x14]
push eax
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x24]
push edx
mov byte [0x66025c], 1
mov dword [esp + 0x34], 1
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x28], ebx
call sub.gdiplus.dll_GdiplusStartup
mov ecx, dword [esp + 0x48]
mov eax, ecx
shr eax, 0x10
test eax, eax
je 0x40a519
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov esi, eax
cmp esi, ebx
je 0x40a662
lea ecx, [esp + 0x14]
mov dword [esi], vtable.Gdiplus::Bitmap.0
mov edx, dword [esp + 0x48]
push ecx
push edx
mov dword [esp + 0x1c], ebx
call sub.gdiplus.dll_GdipCreateBitmapFromFile
mov dword [esi + 8], eax
mov eax, dword [esp + 0x14]
mov dword [esi + 4], eax
jmp 0x40a664
mov eax, dword [esp + 0x4c]
cmp eax, ebx
je 0x40a62a
cmp eax, 2
je 0x40a62a
mov dword [esp + 0x1c], ebx
mov dword [esp + 0x20], ebx
push ecx
push eax
lea esi, [esp + 0x24]
mov dword [esp + 0x48], ebx
call fcn.00407b80
test al, al
jne 0x40a56d
mov eax, dword [esp + 0x1c]
cmp eax, ebx
je 0x40a558
push eax
call dword [sym.imp.KERNEL32.dll_FreeResource]
xor eax, eax
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x34
ret
mov ecx, dword [esp + 0x20]
mov edx, dword [0x628534]
push ecx
push edx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov edi, eax
push edi
push 2
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov esi, eax
cmp esi, ebx
je 0x40a5d1
mov eax, dword [esp + 0x1c]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
push edi
push eax
push esi
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push eax
call fcn.00500790
add esp, 0xc
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
lea ecx, [esp + 0x14]
push ecx
push 1
push esi
mov dword [esp + 0x20], ebx
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jge 0x40a5ef
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea esi, [esp + 0x1c]
call fcn.00407b60
xor eax, eax
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x34
ret
push 0x10
call sub.gdiplus.dll_GdipAlloc
cmp eax, ebx
je 0x40a607
mov ecx, dword [esp + 0x14]
mov esi, eax
call fcn.0040a440
jmp 0x40a609
xor eax, eax
mov edi, eax
mov eax, dword [esp + 0x14]
mov edx, dword [eax]
push eax
mov eax, dword [edx + 8]
call eax
lea esi, [esp + 0x1c]
mov dword [esp + 0x40], 0xffffffff
call fcn.00407b60
jmp 0x40a666
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov esi, eax
cmp esi, ebx
je 0x40a662
mov eax, dword [0x628534]
lea ecx, [esp + 0x1c]
mov dword [esi], vtable.Gdiplus::Bitmap.0
mov edx, dword [esp + 0x48]
push ecx
push edx
push eax
mov dword [esp + 0x28], ebx
call sub.gdiplus.dll_GdipCreateBitmapFromResource
mov dword [esi + 8], eax
mov eax, dword [esp + 0x1c]
mov dword [esi + 4], eax
jmp 0x40a664
xor esi, esi
mov edi, esi
cmp edi, ebx
je 0x40a558
push 0x10
push edi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x40a558
push ebx
lea ecx, [esp + 0x28]
mov dword [esp + 0x28], ebx
mov edx, dword [edi + 4]
push ecx
push edx
call sub.gdiplus.dll_GdipCreateHBITMAPFromBitmap
cmp eax, ebx
je 0x40a699
mov dword [edi + 8], eax
mov eax, dword [edi]
mov edx, dword [eax]
push 1
mov ecx, edi
call edx
mov eax, dword [esp + 0x24]
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x34
ret