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

Disassembly:
push ebp
push edi
push esi
push ebx
sub esp, 0x8c
mov edi, dword [ecx + 0x10]
mov esi, dword [esp + 0xb4]
mov ebx, dword [esp + 0xb8]
test edi, edi
je 0x407191
mov edx, dword [0x847060]
xor eax, eax
mov ebp, ecx
test edx, edx
setne al
mov dword [esp + 4], eax
mov eax, dword [ecx + 0xc]
mov dword [esp], eax
call dword [sym.imp.GDI32.dll_SetLayout]
mov eax, ebx
sub esp, 8
and eax, 4
jne 0x4071a0
mov edi, dword [ebp + 0x10]
mov ecx, ebx
and ecx, 8
mov dword [esp + 0x44], edi
je 0x4071bd
mov edi, dword [esp + 0xb0]
sub edi, dword [esp + 0xa8]
test bl, 0x10
je 0x406edf
test eax, eax
je 0x406ed7
mov eax, dword [esp + 0x44]
imul eax, dword [ebp + 0x14]
cdq
idiv dword [ebp + 0x10]
mov edi, eax
test ecx, ecx
jne 0x407221
mov eax, dword [esp + 0xac]
test eax, eax
jle 0x407191
mov eax, esi
mov ecx, dword [esp + 0x44]
and eax, 1
mov dword [esp + 0x70], eax
mov eax, esi
and eax, 2
mov dword [esp + 0x54], eax
mov eax, esi
and esi, 8
and eax, 4
mov dword [esp + 0x58], esi
mov esi, edi
mov dword [esp + 0x74], eax
mov eax, dword [esp + 0xac]
sub eax, dword [esp + 0xa4]
sub eax, ecx
mov edx, eax
shr edx, 0x1f
add eax, edx
sar eax, 1
mov dword [esp + 0x78], eax
mov eax, dword [esp + 0xb0]
sub eax, dword [esp + 0xa8]
sub eax, edi
mov edx, eax
shr edx, 0x1f
add eax, edx
sar eax, 1
mov dword [esp + 0x60], eax
mov eax, ebx
and ebx, 1
and eax, 2
mov dword [esp + 0x6c], ebx
mov dword [esp + 0x5c], eax
mov eax, dword [esp + 0xac]
sub eax, ecx
mov dword [esp + 0x68], eax
mov eax, dword [esp + 0xa4]
mov dword [esp + 0x64], eax
nop
lea esi, [esi]
mov eax, dword [esp + 0xb0]
test eax, eax
jle 0x407165
mov ecx, dword [esp + 0x70]
mov ebx, dword [esp + 0x74]
mov eax, dword [esp + 0x68]
mov edi, dword [esp + 0x44]
mov edx, dword [esp + 0xac]
test ecx, ecx
cmove eax, dword [esp + 0x64]
test ebx, ebx
cmovne eax, dword [esp + 0x78]
mov ebx, edi
add ebx, eax
sub edx, eax
cmp ebx, dword [esp + 0xac]
mov dword [esp + 0x7c], edx
mov dword [esp + 0x48], ebx
mov ebx, dword [esp + 0xa8]
mov dword [esp + 0x50], eax
cmovle edx, edi
mov edi, dword [esp + 0xb0]
mov dword [esp + 0x4c], edx
sub edi, esi
mov dword [esp + 0x34], edi
mov edi, ebx
jmp 0x4070a4
cmp dword [esp + 0xb0], edx
jl 0x407240
mov ecx, dword [esp + 0x4c]
mov ebx, ecx
mov edx, dword [ebp + 0x14]
mov dword [esp + 0x38], ebx
mov dword [esp + 0x3c], esi
cmp dword [ebp + 0x18], 0
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0x40], ebx
jne 0x407106
cmp dword [esp + 0x44], ecx
jne 0x4071c5
cmp esi, edx
jne 0x4071c5
mov dword [esp + 8], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x14], ebx
mov edx, dword [esp + 0x3c]
mov ebx, dword [esp + 0x38]
mov dword [esp + 0x20], 0xcc0020
mov dword [esp + 4], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], edx
mov dword [esp + 0xc], ebx
mov dword [esp], eax
call dword [sym.imp.GDI32.dll_BitBlt]
sub esp, 0x24
mov eax, dword [esp + 0x5c]
test eax, eax
je 0x407165
add edi, esi
sub dword [esp + 0x34], esi
mov eax, edi
sub eax, dword [esp + 0xa8]
cmp dword [esp + 0xb0], eax
jle 0x407165
mov eax, dword [esp + 0x54]
mov edx, dword [esp + 0x58]
mov ecx, dword [esp + 0x48]
test eax, eax
mov eax, edi
cmovne eax, dword [esp + 0x34]
test edx, edx
cmovne eax, dword [esp + 0x60]
cmp ecx, dword [esp + 0xac]
lea edx, [esi + eax]
jg 0x406ff0
cmp dword [esp + 0xb0], edx
jge 0x407234
mov edx, dword [esp + 0xb0]
mov ebx, dword [esp + 0x44]
mov ecx, dword [ebp + 0x10]
sub edx, eax
cmp dword [ebp + 0x18], 0
mov dword [esp + 0x38], ebx
mov ebx, dword [ebp + 0xc]
mov dword [esp + 0x3c], edx
mov dword [esp + 0x40], ebx
je 0x40701f
mov dword [esp + 8], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x20], ecx
mov dword [esp + 0x14], ebx
mov ecx, dword [esp + 0x38]
mov ebx, dword [esp + 0x3c]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x28], 0x1ff0000
mov dword [esp + 0x24], edx
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ecx
mov dword [esp], eax
call dword [sym.imp.MSIMG32.DLL_AlphaBlend]
sub esp, 0x2c
mov eax, dword [esp + 0x5c]
test eax, eax
jne 0x407088
mov edi, dword [esp + 0x6c]
test edi, edi
je 0x407191
mov edi, dword [esp + 0x44]
add dword [esp + 0x64], edi
mov eax, dword [esp + 0x64]
sub eax, dword [esp + 0xa4]
sub dword [esp + 0x68], edi
cmp dword [esp + 0xac], eax
jg 0x406f80
add esp, 0x8c
pop ebx
pop esi
pop edi
pop ebp
ret 0x1c
mov edi, dword [esp + 0xac]
sub edi, dword [esp + 0xa4]
mov ecx, ebx
and ecx, 8
mov dword [esp + 0x44], edi
jne 0x406eb2
mov edi, dword [ebp + 0x14]
jmp 0x406ec0
mov dword [esp + 8], eax
mov eax, dword [esp + 0x50]
mov dword [esp + 0x24], edx
mov dword [esp + 0x20], ecx
mov edx, dword [esp + 0x40]
mov ebx, dword [esp + 0x3c]
mov ecx, dword [esp + 0x38]
mov dword [esp + 4], eax
mov eax, dword [esp + 0xa0]
mov dword [esp + 0x28], 0xcc0020
mov dword [esp + 0x1c], 0
mov dword [esp + 0x18], 0
mov dword [esp + 0x14], edx
mov dword [esp + 0x10], ebx
mov dword [esp + 0xc], ecx
mov dword [esp], eax
call dword [sym.imp.GDI32.dll_StretchBlt]
sub esp, 0x2c
jmp 0x40707c
mov eax, dword [ebp + 0x10]
imul eax, edi
cdq
idiv dword [ebp + 0x14]
mov dword [esp + 0x44], eax
jmp 0x406edf
mov ecx, dword [ebp + 0x10]
mov ebx, dword [esp + 0x4c]
jmp 0x407003
mov edx, dword [esp + 0xb0]
mov ecx, dword [esp + 0x7c]
sub edx, eax
mov dword [esp + 0x38], ecx
mov dword [esp + 0x3c], edx
jmp 0x40700e