Function at 0x417900
Capabilities:
Resolve function by parsing pe exports

Disassembly:
push 0xffffffffffffffff
push 0x425e00
mov eax, dword fs:[0]
push eax
mov dword fs:[0], esp
sub esp, 0x74
push ebx
push ebp
mov ebp, ecx
push esi
push edi
mov dword [esp + 0x40], ebp
mov eax, dword [ebp]
test eax, eax
je 0x417daa
push eax
call dword [sym.imp.KERNEL32.dll_GlobalLock]
mov esi, eax
mov ecx, ebp
push esi
mov dword [esp + 0x14], esi
mov ebx, 1
mov dword [esp + 0x38], 0
call fcn.00418320
mov edi, eax
push esi
mov ecx, ebp
mov dword [esp + 0x80], edi
call fcn.00418340
mov esi, eax
mov eax, dword [esp + 0x10]
push eax
mov ecx, ebp
call fcn.00418300
xor eax, eax
mov dword [esp + 0x4c], 0x428a78
mov dword [esp + 0x50], eax
lea ecx, [esp + 0x4c]
mov dword [esp + 0x8c], eax
push ecx
mov ecx, ebp
mov dword [esp + 0x34], eax
call fcn.00418230
test eax, eax
je 0x4179cb
mov ecx, dword [esp + 0x50]
mov edx, dword [esp + 0x94]
lea eax, [esp + 0x4c]
push ebx
neg eax
sbb eax, eax
mov dword [esp + 0x34], ebx
and eax, ecx
push eax
push edx
call dword [sym.imp.GDI32.dll_SelectPalette]
mov dword [esp + 0x34], eax
mov eax, dword [esp + 0x94]
push eax
call dword [sym.imp.GDI32.dll_RealizePalette]
mov ecx, dword [esp + 0x94]
push 3
push ecx
call dword [sym.imp.GDI32.dll_SetStretchBltMode]
mov ecx, dword [esp + 0x98]
mov edx, dword [ecx]
mov eax, dword [ecx + 8]
sub eax, edx
mov dword [esp + 0x18], edx
mov edx, dword [ecx + 4]
mov dword [esp + 0x20], eax
mov eax, dword [ecx + 0xc]
sub eax, edx
mov dword [esp + 0x14], eax
mov eax, dword [esp + 0x9c]
test eax, eax
jne 0x417a6b
mov ebx, dword [esp + 0xa4]
lea ecx, [edx + esi]
push ebx
mov ebx, dword [esp + 0xa4]
push ebx
mov ebx, dword [esp + 0x18]
push ebx
mov eax, dword [esp + 0x24]
sub esp, 0x10
mov dword [esp + 0x7c], ecx
mov ebx, esp
xor ecx, ecx
add eax, edi
sub esp, 0x10
mov dword [ebx], ecx
mov dword [esp + 0x94], ecx
mov dword [ebx + 4], ecx
mov ecx, esp
mov dword [ebx + 8], edi
mov dword [ebx + 0xc], esi
mov esi, dword [esp + 0x44]
mov dword [ecx], esi
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x8c]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0xc0]
push eax
mov dword [ecx + 0xc], edx
jmp 0x417d56
cmp eax, 4
jne 0x417add
mov eax, dword [esp + 0x14]
xor ecx, ecx
sub eax, esi
xor ebx, ebx
cdq
sub eax, edx
sar eax, 1
lea edx, [eax + edi]
mov dword [esp + 0x5c], edx
lea edx, [eax + esi]
mov dword [esp + 0x60], edx
mov edx, dword [esp + 0xa4]
push edx
mov edx, dword [esp + 0xa4]
push edx
mov edx, dword [esp + 0x18]
push edx
sub esp, 0x10
mov edx, esp
sub esp, 0x10
mov dword [edx], ecx
mov ecx, esp
mov dword [edx + 4], ebx
mov dword [edx + 8], edi
mov dword [edx + 0xc], esi
mov edx, dword [esp + 0x88]
mov dword [ecx], eax
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x8c]
mov dword [ecx + 8], edx
mov dword [ecx + 0xc], eax
mov ecx, dword [esp + 0xc0]
push ecx
jmp 0x417d56
cmp eax, 2
jne 0x417c48
mov edx, dword [esp + 0x20]
lea eax, [edx - 1]
cdq
idiv edi
inc eax
mov dword [esp + 0x2c], eax
mov eax, dword [esp + 0x14]
dec eax
cdq
idiv esi
mov edx, dword [esp + 0x2c]
inc eax
test edx, edx
mov dword [esp + 0x38], eax
jle 0x417d65
mov eax, edi
mov dword [esp + 0x1c], 0
neg eax
mov dword [esp + 0x48], eax
mov eax, dword [esp + 0x20]
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
cmp edi, eax
mov dword [esp + 0x18], edi
jl 0x417b36
mov dword [esp + 0x18], eax
mov edx, dword [ecx]
mov eax, dword [esp + 0x1c]
add edx, eax
mov eax, dword [esp + 0x38]
test eax, eax
mov dword [esp + 0x3c], edx
jle 0x417c13
mov edi, dword [esp + 0x18]
mov dword [esp + 0x24], eax
add edx, edi
xor edi, edi
mov dword [esp + 0x5c], edx
mov edx, esi
neg edx
mov dword [esp + 0x44], edx
mov edx, dword [esp + 0x14]
mov dword [esp + 0x20], edx
cmp esi, edx
jge 0x417b74
mov edx, esi
mov eax, dword [ecx + 4]
mov ecx, esi
add eax, edi
sub ecx, edx
lea ebx, [eax + edx]
add edx, ecx
mov dword [esp + 0x70], edx
mov edx, dword [esp + 0xa4]
push edx
mov edx, dword [esp + 0xa4]
push edx
mov edx, dword [esp + 0x18]
push edx
xor edx, edx
sub esp, 0x10
mov ebp, esp
sub esp, 0x10
mov dword [ebp], edx
mov edx, dword [esp + 0x9c]
mov dword [ebp + 4], ecx
mov ecx, dword [esp + 0x44]
mov dword [ebp + 8], ecx
mov ecx, esp
mov dword [ebp + 0xc], edx
mov edx, dword [esp + 0x68]
mov dword [ecx], edx
mov ebp, dword [esp + 0x6c]
mov dword [ecx + 4], eax
mov eax, dword [esp + 0x88]
mov dword [ecx + 8], eax
mov dword [ecx + 0xc], ebx
mov ecx, dword [esp + 0xc0]
push ecx
mov ecx, ebp
call fcn.00417e40
mov edx, dword [esp + 0x20]
mov ecx, dword [esp + 0x44]
mov ebx, eax
mov eax, dword [esp + 0x24]
add edi, esi
add edx, ecx
mov ecx, dword [esp + 0x98]
dec eax
mov dword [esp + 0x20], edx
mov dword [esp + 0x24], eax
jne 0x417b6e
mov edi, dword [esp + 0x7c]
test ebx, ebx
je 0x417c1c
mov ebx, 1
mov eax, dword [esp + 0x1c]
mov edx, dword [esp + 0x48]
add eax, edi
mov dword [esp + 0x1c], eax
mov eax, dword [esp + 0x28]
add eax, edx
mov edx, dword [esp + 0x2c]
dec edx
mov dword [esp + 0x28], eax
mov dword [esp + 0x2c], edx
jne 0x417b2a
jmp 0x417d65
cmp eax, 1
jne 0x417cb7
mov ebx, dword [esp + 0xa4]
mov eax, dword [esp + 0x20]
mov ecx, dword [esp + 0x18]
push ebx
mov ebx, dword [esp + 0xa4]
add eax, ecx
mov ecx, dword [esp + 0x18]
push ebx
mov ebx, dword [esp + 0x18]
add ecx, edx
push ebx
mov dword [esp + 0x7c], ecx
sub esp, 0x10
xor ecx, ecx
mov ebx, esp
sub esp, 0x10
mov dword [esp + 0xa4], ecx
mov dword [ebx], ecx
mov dword [ebx + 4], ecx
mov ecx, esp
mov dword [ebx + 8], edi
mov dword [ebx + 0xc], esi
mov esi, dword [esp + 0x44]
mov dword [ecx], esi
mov dword [ecx + 4], edx
mov edx, dword [esp + 0x9c]
mov dword [ecx + 8], eax
mov eax, dword [esp + 0xc0]
push eax
mov dword [ecx + 0xc], edx
jmp 0x417d56
push ecx
lea ecx, [esp + 0x58]
push ecx
call dword [sym.imp.USER32.dll_CopyRect]
mov eax, dword [esp + 0x5c]
mov ebx, dword [esp + 0x54]
sub eax, ebx
sub eax, edi
cdq
sub eax, edx
mov ecx, eax
mov eax, dword [esp + 0x60]
sar ecx, 1
add ecx, ebx
mov ebx, dword [esp + 0x58]
sub eax, ebx
sub eax, esi
cdq
sub eax, edx
sar eax, 1
add eax, ebx
mov ebx, dword [esp + 0xa4]
movsx ecx, cx
push ebx
mov ebx, dword [esp + 0xa4]
movsx eax, ax
push ebx
mov ebx, dword [esp + 0x18]
lea edx, [ecx + edi]
push ebx
mov dword [esp + 0x78], edx
lea edx, [eax + esi]
sub esp, 0x10
mov dword [esp + 0x8c], edx
mov ebx, esp
xor edx, edx
sub esp, 0x10
mov dword [esp + 0xa4], edx
mov dword [ebx], edx
mov dword [ebx + 4], edx
mov edx, esp
mov dword [ebx + 8], edi
mov dword [ebx + 0xc], esi
mov dword [edx], ecx
mov ecx, dword [esp + 0x9c]
mov dword [edx + 4], eax
mov eax, dword [esp + 0x98]
mov dword [edx + 8], eax
mov dword [edx + 0xc], ecx
mov edx, dword [esp + 0xc0]
push edx
mov ecx, ebp
call fcn.00417e40
xor ebx, ebx
cmp eax, 0xffffffff
setne bl
mov eax, dword [ebp]
push eax
call dword [sym.imp.KERNEL32.dll_GlobalUnlock]
mov eax, dword [esp + 0x30]
test eax, eax
je 0x417d8c
mov ecx, dword [esp + 0x34]
mov edx, dword [esp + 0x94]
push 0
push ecx
push edx
call dword [sym.imp.GDI32.dll_SelectPalette]
mov dword [esp + 0x4c], 0x427fd8
lea ecx, [esp + 0x4c]
mov dword [esp + 0x8c], 1
call sub.MFC42.DLL_CGdiObject::DeleteObject
mov eax, ebx
mov ecx, dword [esp + 0x84]
pop edi
pop esi
pop ebp
mov dword fs:[0], ecx
pop ebx
add esp, 0x80
ret 0x14