Function at 0x464260
Capabilities:
Extract resource via kernel32 functions
Read file on windows

Disassembly:
push ebx
push ebp
push esi
push edi
mov ebx, ecx
call fcn.00464070
mov esi, dword [esp + 0x14]
xor edi, edi
cmp esi, edi
je 0x4643f2
push esi
call dword [sym.imp.MSVCRT.dll_wcslen]
add esp, 4
test eax, eax
je 0x4643f2
push 4
push str.res:
push esi
call dword [sym.imp.MSVCRT.dll__wcsnicmp]
add esp, 0xc
test eax, eax
jne 0x46433c
push 0x2f
push esi
call dword [sym.imp.MSVCRT.dll_wcsrchr]
add esp, 8
cmp eax, edi
je 0x46444d
add eax, 2
push 0x83e
push eax
mov eax, dword [0x5c01a4]
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceW]
mov ebp, eax
test ebp, ebp
je 0x4643a0
mov ecx, dword [0x5c01a4]
push ebp
push ecx
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
mov dword [esp + 0x14], eax
je 0x4643a0
mov edx, dword [0x5c01a4]
push ebp
push edx
call dword [sym.imp.KERNEL32.dll_SizeofResource]
mov esi, eax
push esi
push 0x22
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [ebx + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov edi, eax
mov eax, dword [esp + 0x14]
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ecx, esi
mov esi, eax
mov edx, ecx
push ebp
shr ecx, 2
rep movsd dword es:[edi], dword [esi]
mov ecx, edx
and ecx, 3
rep movsb byte es:[edi], byte [esi]
call dword [sym.imp.KERNEL32.dll_FreeResource]
jmp 0x4643a0
push 0x4da040
push esi
call dword [sym.imp.MSVCRT.dll__wfopen]
mov esi, eax
add esp, 8
cmp esi, edi
je 0x4643a0
mov ebp, dword [sym.imp.MSVCRT.dll_fseek]
push 2
push edi
push esi
call ebp
push esi
call dword [sym.imp.MSVCRT.dll_ftell]
add esp, 0x10
mov edi, eax
push edi
push 0x22
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
push eax
mov dword [ebx + 0xc], eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
push 0
push 0
push esi
mov dword [esp + 0x20], eax
call ebp
mov eax, dword [esp + 0x20]
push esi
push 1
push edi
push eax
call dword [sym.imp.MSVCRT.dll_fread]
push esi
call dword [sym.imp.MSVCRT.dll_fclose]
add esp, 0x20
mov eax, dword [ebx + 0xc]
xor edi, edi
cmp eax, edi
je 0x4643f2
lea ecx, [esp + 0x14]
mov dword [esp + 0x14], edi
push ecx
push 1
push eax
call dword [sym.imp.ole32.dll_CreateStreamOnHGlobal]
test eax, eax
jne 0x4643f2
cmp dword [esp + 0x14], edi
je 0x4643f2
push 0x10
call sub.gdiplus.dll_GdipAlloc
mov esi, eax
cmp esi, edi
je 0x4643ed
mov ecx, dword [esp + 0x14]
lea eax, [esi + 4]
push eax
push ecx
mov dword [esi], 0x4c0814
mov dword [eax], edi
call sub.gdiplus.dll_GdipLoadImageFromStream
mov dword [esi + 8], eax
jmp 0x4643ef
xor esi, esi
mov dword [ebx + 0x14], esi
mov esi, dword [ebx + 0x14]
cmp esi, edi
je 0x46444d
mov eax, dword [esi + 4]
lea edx, [esp + 0x14]
push edx
push eax
mov dword [esp + 0x1c], edi
call sub.gdiplus.dll_GdipGetImageWidth
cmp eax, edi
je 0x464412
mov dword [esi + 8], eax
mov ecx, dword [esp + 0x14]
mov esi, dword [ebx + 0x14]
mov dword [ebx + 4], ecx
lea edx, [esp + 0x14]
mov eax, dword [esi + 4]
push edx
push eax
mov dword [esp + 0x1c], edi
call sub.gdiplus.dll_GdipGetImageHeight
cmp eax, edi
je 0x464435
mov dword [esi + 8], eax
mov ecx, dword [esp + 0x14]
xor eax, eax
mov dword [ebx + 8], ecx
mov ecx, dword [ebx + 4]
cmp ecx, edi
pop edi
pop esi
pop ebp
setg al
pop ebx
ret 4
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
ret 4