Function at 0x407360
Capabilities:
Extract resource via kernel32 functions

Disassembly:
sub esp, 0x70
push ebx
push ebp
push esi
push edi
mov dword [esp + 0x18], 0
call sub.MFC42.DLL_AfxGetModuleState
mov ecx, dword [esp + 0x84]
mov eax, dword [eax + 8]
and ecx, 0xffff
push 2
push ecx
push eax
call dword [sym.imp.KERNEL32.dll_FindResourceA]
mov esi, eax
test esi, esi
je 0x4077c7
call sub.MFC42.DLL_AfxGetModuleState
mov eax, dword [eax + 8]
push esi
push eax
call dword [sym.imp.KERNEL32.dll_LoadResource]
test eax, eax
je 0x4077c7
push eax
call dword [sym.imp.KERNEL32.dll_LockResource]
mov ebx, eax
test ebx, ebx
mov dword [esp + 0x38], ebx
je 0x4077c7
push 0
call dword [sym.imp.GDI32.dll_CreateCompatibleDC]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x34], ebp
je 0x4077c7
mov dword [esp + 0x58], 0x28
mov edx, dword [ebx + 4]
mov dword [esp + 0x5c], edx
mov eax, dword [ebx + 8]
mov dword [esp + 0x60], eax
xor eax, eax
push eax
lea ecx, [esp + 0x40]
push eax
push ecx
lea edx, [esp + 0x64]
push eax
mov edi, 1
push edx
push ebp
mov word [esp + 0x7c], di
mov word [esp + 0x7e], 0x20
mov dword [esp + 0x80], eax
mov dword [esp + 0x84], eax
mov dword [esp + 0x88], eax
mov dword [esp + 0x8c], eax
mov dword [esp + 0x90], eax
mov dword [esp + 0x94], eax
mov dword [esp + 0x54], eax
call dword [sym.imp.GDI32.dll_CreateDIBSection]
mov esi, eax
test esi, esi
jne 0x40745f
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x70
ret 0xc
push esi
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
mov dword [esp + 0x20], eax
lea eax, [esp + 0x40]
push eax
push 0x18
push esi
call dword [sym.imp.GDI32.dll_GetObjectA]
mov eax, dword [esp + 0x4c]
mov ecx, eax
and ecx, 0x80000003
jns 0x40748c
dec ecx
or ecx, 0xfffffffc
inc ecx
je 0x4074a4
inc eax
mov edx, eax
and edx, 0x80000003
jns 0x40749e
dec edx
or edx, 0xfffffffc
inc edx
jne 0x40748e
mov dword [esp + 0x4c], eax
mov cx, word [ebx + 0xe]
xor esi, esi
cmp cx, 8
ja 0x4074bb
mov esi, dword [ebx + 0x20]
test esi, esi
jne 0x4074bb
mov esi, edi
shl esi, cl
push 3
push ebp
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
mov eax, dword [ebx + 8]
mov ecx, dword [ebx + 4]
push 0xcc0020
push 0
lea edx, [ebx + esi*4 + 0x28]
push ebx
push edx
push eax
push ecx
push 0
push 0
push eax
push ecx
push 0
push 0
push ebp
call dword [sym.imp.GDI32.dll_StretchDIBits]
cmp eax, 0xffffffff
jne 0x407515
mov eax, dword [esp + 0x20]
push eax
push ebp
call dword [sym.imp.GDI32.dll_SelectObject]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push ebp
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x70
ret 0xc
push 0x660
push 0x42
mov dword [esp + 0x1c], 0x64
call dword [sym.imp.KERNEL32.dll_GlobalAlloc]
mov ebp, eax
test ebp, ebp
mov dword [esp + 0x30], ebp
jne 0x40753e
mov ecx, dword [esp + 0x20]
push ecx
jmp 0x4077ae
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
mov dword [esi + 4], edi
xor edi, edi
push edi
push edi
push 0x7fffffff
lea edx, [esi + 0x10]
push 0x7fffffff
push edx
mov dword [esi], 0x20
mov dword [esi + 0xc], edi
mov dword [esi + 8], edi
call dword [sym.imp.USER32.dll_SetRect]
mov ecx, dword [esp + 0x88]
xor eax, eax
mov al, ch
mov edx, dword [esp + 0x54]
mov byte [esp + 0x84], al
mov eax, ecx
shr eax, 0x10
mov byte [esp + 0x12], al
mov eax, dword [esp + 0x8c]
xor ecx, ecx
mov dword [esp + 0x1c], edi
mov cl, ah
shr eax, 0x10
mov byte [esp + 0x13], al
mov eax, dword [ebx + 8]
mov byte [esp + 0x11], cl
lea ecx, [eax - 1]
imul ecx, dword [esp + 0x4c]
add ecx, edx
cmp eax, edi
mov dword [esp + 0x2c], ecx
jle 0x407769
mov edi, dword [ebx + 4]
xor ebp, ebp
test edi, edi
jle 0x407747
mov eax, dword [esp + 0x14]
add eax, 2
shl eax, 4
mov dword [esp + 0x28], eax
cmp ebp, edi
mov dword [esp + 0x24], ebp
lea ecx, [ecx + ebp*4]
jge 0x407737
mov al, byte [ecx]
mov dl, byte [esp + 0x88]
cmp al, dl
jb 0x407629
cmp al, byte [esp + 0x8c]
ja 0x407629
mov dl, byte [esp + 0x84]
xor eax, eax
mov al, byte [ecx + 1]
cmp al, dl
jb 0x407629
cmp al, byte [esp + 0x11]
ja 0x407629
mov eax, dword [ecx]
mov dl, byte [esp + 0x12]
shr eax, 0x10
cmp al, dl
jb 0x407629
cmp al, byte [esp + 0x13]
jbe 0x407631
add ecx, 4
inc ebp
cmp ebp, edi
jl 0x4075ea
cmp ebp, dword [esp + 0x24]
jle 0x407737
mov ecx, dword [esi + 8]
mov eax, dword [esp + 0x14]
cmp ecx, eax
jb 0x407688
mov esi, dword [esp + 0x30]
push esi
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x28]
mov edx, dword [esp + 0x14]
add eax, 0x640
push 0x42
add edx, 0x64
push eax
push esi
mov dword [esp + 0x20], edx
mov dword [esp + 0x34], eax
call dword [sym.imp.KERNEL32.dll_GlobalReAlloc]
test eax, eax
mov dword [esp + 0x30], eax
je 0x4077a9
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x24]
lea edi, [eax + 1]
push edi
push ebp
push eax
mov eax, dword [esi + 8]
add eax, 2
push edx
shl eax, 4
add eax, esi
push eax
call dword [sym.imp.USER32.dll_SetRect]
mov eax, dword [esp + 0x24]
mov ecx, dword [esi + 0x10]
lea ebx, [esi + 0x10]
cmp eax, ecx
jge 0x4076b9
mov dword [ebx], eax
mov eax, dword [esp + 0x1c]
mov ecx, dword [esi + 0x14]
cmp eax, ecx
jge 0x4076c7
mov dword [esi + 0x14], eax
cmp ebp, dword [esi + 0x18]
jle 0x4076cf
mov dword [esi + 0x18], ebp
cmp edi, dword [esi + 0x1c]
jle 0x4076d7
mov dword [esi + 0x1c], edi
mov ecx, dword [esi + 8]
inc ecx
mov eax, ecx
mov dword [esi + 8], ecx
cmp eax, 0x7d0
jne 0x407733
mov ecx, dword [esp + 0x28]
push esi
push ecx
push 0
call dword [sym.imp.GDI32.dll_ExtCreateRegion]
mov edi, eax
mov eax, dword [esp + 0x18]
test eax, eax
je 0x407713
push 2
push edi
push eax
push eax
call dword [sym.imp.GDI32.dll_CombineRgn]
push edi
call dword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x407717
mov dword [esp + 0x18], edi
push 0
push 0
push 0x7fffffff
push 0x7fffffff
push ebx
mov dword [esi + 8], 0
call dword [sym.imp.USER32.dll_SetRect]
mov ebx, dword [esp + 0x38]
mov edi, dword [ebx + 4]
mov ecx, dword [esp + 0x2c]
inc ebp
cmp ebp, edi
jl 0x4075db
mov ebp, dword [esp + 0x4c]
mov eax, dword [esp + 0x1c]
mov edx, dword [ebx + 8]
sub ecx, ebp
inc eax
mov dword [esp + 0x2c], ecx
cmp eax, edx
mov dword [esp + 0x1c], eax
jl 0x4075c0
mov ebp, dword [esp + 0x30]
mov eax, dword [esp + 0x14]
push esi
add eax, 2
shl eax, 4
push eax
push 0
call dword [sym.imp.GDI32.dll_ExtCreateRegion]
push ebp
mov esi, eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
push ebp
call dword [sym.imp.KERNEL32.dll_GlobalFree]
mov edi, dword [esp + 0x18]
test edi, edi
je 0x4077d3
push 2
push esi
push edi
push edi
call dword [sym.imp.GDI32.dll_CombineRgn]
push esi
call dword [sym.imp.GDI32.dll_DeleteObject]
jmp 0x4077d9
mov edx, dword [esp + 0x20]
push edx
mov esi, dword [esp + 0x38]
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
pop edi
pop esi
pop ebp
xor eax, eax
pop ebx
add esp, 0x70
ret 0xc
mov dword [esp + 0x18], esi
mov edi, esi
mov ecx, dword [esp + 0x20]
mov esi, dword [esp + 0x34]
push ecx
push esi
call dword [sym.imp.GDI32.dll_SelectObject]
push eax
call dword [sym.imp.GDI32.dll_DeleteObject]
push esi
call dword [sym.imp.GDI32.dll_DeleteDC]
mov eax, edi
pop edi
pop esi
pop ebp
pop ebx
add esp, 0x70
ret 0xc