Function at 0x401590
Capabilities:
Extract resource via kernel32 functions

Disassembly:
push 0xffffffffffffffff
push 0x485b98
mov eax, dword fs:[0]
push eax
sub esp, 0x28
push ebx
push esi
push edi
mov eax, dword [0x4a5584]
xor eax, esp
push eax
lea eax, [esp + 0x38]
mov dword fs:[0], eax
xor ebx, ebx
cmp byte [0x4aee88], bl
jne 0x4015f3
lea eax, [esp + 0x20]
push eax
lea ecx, [esp + 0x2c]
push ecx
lea edx, [esp + 0x20]
push edx
mov byte [0x4aee88], 1
mov dword [esp + 0x34], 1
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], ebx
mov dword [esp + 0x40], ebx
mov dword [esp + 0x24], ebx
call sub.gdiplus.dll_GdiplusStartup
mov ecx, dword [esp + 0x48]
mov eax, ecx
shr eax, 0x10
test eax, eax
je 0x401639
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov esi, eax
cmp esi, ebx
je 0x40179e
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 0x4017a0
mov eax, dword [esp + 0x4c]
cmp eax, ebx
je 0x401764
cmp eax, 2
je 0x401764
mov dword [esp + 0x20], ebx
mov dword [esp + 0x24], ebx
push ecx
push eax
lea esi, [esp + 0x28]
mov dword [esp + 0x48], ebx
call fcn.00401220
test al, al
jne 0x40168d
mov eax, dword [esp + 0x20]
cmp eax, ebx
je 0x401678
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 + 0x24]
mov edx, dword [0x4a83c8]
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 0x4016f1
mov eax, dword [esp + 0x20]
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.004589e0
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 0x40170f
push esi
call dword [sym.imp.KERNEL32.dll_GlobalFree]
lea esi, [esp + 0x20]
call fcn.00401200
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
mov esi, eax
cmp esi, ebx
je 0x401741
mov eax, dword [esp + 0x14]
lea edx, [esp + 0x18]
push edx
push eax
mov dword [esi], vtable.Gdiplus::Bitmap.0
mov dword [esp + 0x20], ebx
call sub.gdiplus.dll_GdipCreateBitmapFromStream
mov dword [esi + 8], eax
mov eax, dword [esp + 0x18]
mov dword [esi + 4], eax
jmp 0x401743
xor esi, esi
mov eax, dword [esp + 0x14]
mov ecx, dword [eax]
mov edx, dword [ecx + 8]
push eax
mov edi, esi
call edx
lea esi, [esp + 0x20]
mov dword [esp + 0x40], 0xffffffff
call fcn.00401200
jmp 0x4017a2
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov esi, eax
cmp esi, ebx
je 0x40179e
push ebx
call dword [sym.imp.KERNEL32.dll_GetModuleHandleW]
lea ecx, [esp + 0x18]
mov dword [esi], vtable.Gdiplus::Bitmap.0
mov edx, dword [esp + 0x48]
push ecx
push edx
push eax
mov dword [esp + 0x24], ebx
call sub.gdiplus.dll_GdipCreateBitmapFromResource
mov dword [esi + 8], eax
mov eax, dword [esp + 0x18]
mov dword [esi + 4], eax
jmp 0x4017a0
xor esi, esi
mov edi, esi
cmp edi, ebx
je 0x401678
push 0x10
push edi
call dword [sym.imp.KERNEL32.dll_IsBadReadPtr]
test eax, eax
jne 0x401678
push ebx
lea ecx, [esp + 0x20]
mov dword [esp + 0x20], ebx
mov edx, dword [edi + 4]
push ecx
push edx
call sub.gdiplus.dll_GdipCreateHBITMAPFromBitmap
cmp eax, ebx
je 0x4017d5
mov dword [edi + 8], eax
mov eax, dword [edi]
mov edx, dword [eax]
push 1
mov ecx, edi
call edx
mov eax, dword [esp + 0x1c]
mov ecx, dword [esp + 0x38]
mov dword fs:[0], ecx
pop ecx
pop edi
pop esi
pop ebx
add esp, 0x34
ret